Perl Monk, Perl Meditation | |
PerlMonks |
Re: AJAX and Perl-based web applicationsby cees (Curate) |
on Jun 25, 2005 at 13:29 UTC ( [id://469923]=note: print w/replies, xml ) | Need Help?? |
There really isn't much difference to building a script that handles an AJAX request compared to a regular request. The main difference is that the AJAX request usually returns XML, or possibly just a small snippet of HTML. The hard part around AJAX is the JavaScript side (since I am a perl developer, JavaScript is hard ;). There are already some JavaScript libraries out there that can really simplify this. I've used one called Sarissa that works pretty well, but I haven't done enough in this area to recommend the "best" JavaScript library out there. Just do some searching. If you want an example using CGI::Application, then you can have a look at my attempt at building an Upload Meter (something like Apache::UploadMeter). It is just a prototype, so there isn't much in the way of documentation, but it does show how you can do AJAX with CGI::Application (as you will notice, it is no different from a regular CGI::Application module). Here is a tarball of the entire prototype. I would like to wrap this up in a simple to use module at some point, but time is my enemy right now :)
In Section
Seekers of Perl Wisdom
|
|