[Catalyst] Catalyst - any good AJAX tutes?

David Morel dmorel69 at gmail.com
Tue Mar 10 08:58:38 GMT 2009


Le 6 mars 09 à 17:33, Francesc Romà i Frigolé a écrit :

 > On Fri, Mar 6, 2009 at 6:43 AM, <kakimoto at tpg.com.au>wrote:
 >
 > hello there,
 >
 >  I would like to use AJAX in my catalyst app. Any good
 >  references/tutes
 > to recommend?
 >
 > thanks.
 >
 > K. akimoto
 >
 >
 > Hello,
 >
 > Depends on what do you want to do with AJAX. For example, if you want
 > to do forms, I think it is a bit more complicated than suggested in
 > previous replies.
 >
 > Ideally, for forms, you'd like to have some modules that magically
 > initialize your forms with data from your model, then render a nice
 > form with your favorite JS toolkit, using  AJAX for things like
 > auto-complete with data from your model, validate the forms both on
 > the client and on the server, and then update your model with the  
user
 > submitted data.
 >
 > So far, I haven't found anything that does this for my tools of
 > choice: DBIx::Class + Dojo
 >
 > There is HTML::FormFu::Dojo which sounds promising but hasn't been
 > released yet. Check it out here: http://code.google.com/p/html- 
formfu/

Well, I don't know about Dojo, but I had to do this sort of things last
week (multiple forms on a page, with slide up & down, dynamically add
forms, update, display validation errors, etc). I started using Mootools
which I knew a bit, ran in a lot of issues, switched to jQuery which I
had no clue about and the thing was done in 10 lines of JS and 2 hours.

Of course HTML::FormFu powers it (it's a non-Cat app, made with mason),
but even without Catalyst, the simple FormFu + jQuery combination is
IMHO a killer. And I didn't even use the Forms plugin (which I should
probably have). I heard jQuery was crappy in some regards, notably
polluting the global namespace, which YUI takes care not doing IIRC, but
for what I had to do, using it was a real pleasure. It DWIM, easily,
and that's not so common.

D.Morel





More information about the Catalyst mailing list