I fear its a "bridge too far".

I believe this has been occasionally mentioned on the ptk list/newsgroup. A similar project was started sometime ago to provide a Tk-like API for XUL, but it never went anywhere.

It would be nice to take all those Tk apps, flip a switch, and make them run under insert favorite webserver/framework here. But pTk tends to encourage a tight coupling between View and Model that may not map well to the loose coupling required between the browser running JS and the server running Perl. Assuming that much of the mapping needs to run in the browser, the API may not port very well into Javascript.

That said, it might be possible to create a Tk-like API in Javascript, and then add some sort of preprocessor/template system to convert the various closure and tied variable interfaces into XHR driven equivalents. The exersize will certainly give you a significant appreciation of the efforts of the late great Nick Ing-Simmons.

Whether or not carrying forward such an API is a good idea is debatable...OTOH, any consistent API for AJAX widgets would be a godsend. Perhaps some extensions to HTML::Widget would be a better solution ?


In reply to Re: Tk-esque ajax libraries by renodino
in thread Tk-esque ajax libraries by f00li5h

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.