in reply to Re: Tk-esque ajax libraries
in thread Tk-esque ajax libraries
renodino, does make some excelent, and somewhat disheartening points, which I've taken the liberty of mangling and answering (perhaps) below:
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
In order to manipulate the widgits the request would need to contain some javscript - which could get a little hairy. I was going to (to start anway) just map every single onclick onmouseover etc to a http request that then calls the coderef that was assigned to it and returns some javascript or html to suit (obviously you'd not map every event, only those for which there was something meaningful to call).
...convert the various closure and tied variable interfaces into XHR...
I'd most definately not want to convert the callbacks and send them off as javascript - not because it's a bad plan, but more because i have a blood condition, and code like that would start a nosebleed for sure!
HTML::Widget
Hey Neat! there's a bundle of code i don't have to write myself
Tk's interface is ... kinda... not... good
I'll give wxperl an oggling too... Since Ihave next to no knowledge of my own, anything is a welcome addition! If you know of an API that you think is good, I'd love to know before I belt out some code, although i figured if i manage to pull even a fraction of this off, it would benifit more people since (based on statistics i just made up then) more people are using Tk for their GUI's than any other library
Also, it occurred to me that you could simply drop your Tk applicatoin in $public_html_directory and add a directive to the config files for $webserver that adds the magical TkJax libraries into @INC before the place the Tk libs normally live, and Viola! instant web application (oddly, this seems like it would be a little way down the track).
I'll see if I can smack together a bit of a Hello World type example, and see how it goes from there ...
|
|---|