Section A.13. Perl Ajax Frameworks


A.13. Perl Ajax Frameworks

A.13.1. CGI::AjaxExport Perl Methods to JavaScript for Ajax

CGI::Ajax (http://pjax.sourceforge.net/) is a Perl module to make it trivial to write Ajax scripts using Perl. The module is object-based Perl, and creating a link from a JavaScript event to your Perl code is as easy as defining the JavaScript function name to Perl subroutine name mapping.

  • Can be used to link any Perl code to an HTML event, including fetching other URLs (using LWP, for example)

  • Nestable, so an HTML event can start a chain of Ajax events (e.g., onClick= "do_this( ); now_that(); finally_this( )")

  • Can handle GET or POST

  • Not necessary to have your exported subroutines named in a specific wayname them what you want

  • Very small overheadallows you to keep thinking Perl and not get bogged down

  • Active development community

  • Open source library (Perl and Artistic license) by Brian Thomas

A.13.2. HTML::PrototypeGenerate HTML and JavaScript for the Prototype Library

HTML::Prototype (http://search.cpan.org/dist/HTML-Prototype/) contains some code generators for Prototype, the famous JavaScript object-oriented library, and the script.aculous extensions.

  • Basically similar to the Prototype helpers in Ruby on Rails

  • Open source license (GPL and Artistic) by multiple contributors




Ajax Design Patterns
Ajax Design Patterns
ISBN: 0596101805
EAN: 2147483647
Year: 2007
Pages: 169

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net