Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: AJAX and Perl-based web applications

by cees (Curate)
on Jun 25, 2005 at 13:29 UTC ( [id://469923]=note: print w/replies, xml ) Need Help??


in reply to AJAX and Perl-based web applications

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 :)

  • Comment on Re: AJAX and Perl-based web applications

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://469923]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-19 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found