[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] CA and AJAX


Robert Hicks wrote:
> I am looking at the Ext Js 2.0 AJAX framework and it looks really good
> (I also like jQuery). Is anybody working on an easy way to call Ext
> stuff from Perl through CA?

Ajax stuff is fun to do, but it's really no different from normal web work, at
least from a C::A perspective. You call run modes just the same. It doesn't
matter how the request makes it to the backend. The only real differences are
the following:

+ you almost never return full pages (header, nav, footer, etc). This is pretty
easy to do with templating. I just set a no_wrapper param that goes to my
templates on Ajax requests to turn off the extra stuff I don't need.

+ JSON - If I have any advice about Ajax programming is don't use XML if you can
avoid it. It's nice to be able to read RSS feeds from some other source, but if
you can control the data source use JSON. It's faster, smaller, easier to read
and more "natural" to Perl. Check out C::A::Plugin::JSON for some easy ways to
use it

-- 
Michael Peters
Developer
Plus Three, LP


#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.