[Catalyst] Catalyst + Ajax
Brandon Black
blblack at gmail.com
Thu Dec 1 15:53:08 CET 2005
On 12/1/05, Chisel Wright <chisel at herlpacker.co.uk> wrote:
> Since Ajax keeps cropping up on the list, I thought I'd make a start on
> a "Ajax with Catalyst" demo app.
[...]
> Where is everyone looking to deduce the relevant incantations? The POD
> for HTML::Prototype is useful to a degree, but I'm suffering for lack of
> working examples. Ideally, I'd like to be able to produce something
> that's a useful resource for others starting out with Catalyst+Ajax -
> save us answering the same basic questions over and over....
>
Agreed, there needs to be a clearer set of docs + examles for the
functionality provided via Catalyst::Plugin::Prototype. Some of it
comes from Prototype (which is largely undocumented), some comes from
Script.aculo.us, and the perl interface comes from
HTML::Prototype[::More]. None of the above are really documented as
well as they could be, and the particular combination of them within
the Catalyst plugin architecture even less so.
So far the way I've been going about it is to initially pretend
C::P::Prototype doesn't exist and look for whatever I need as if I
were a raw user of Prototype/Script.aculo.us, find out how to do it
directly, then look at HTML::Prototype docs to see if it was
abstracted from the perl perspective in a way that's useful to me or
not, and then implement by whatever means neccesary.
Of course, for the most part, all my ajax work tends to involve
Catalyst only peripherally, with the rare exception of things like the
autocompleter result sets plugin method. The ajax stuff just happens
to be in the javascript/dhtml that Catalyst is sending out, and
Catalyst happens to answer certain user requests that happen to have
come from XmlHttpRequest instead of the browser itself. I tend to
split off XmlHttpRequest responders into seperate controllers for
clarity too (MyApp::C::foo handles direct page requests related to
foo, MyApp::C::foo::ajax handles ajax XmlHttpRequests from those
pages).
Use the source Luke - reading the .js source code of these Ajax
helpers is the only way to really know what they're capable of.
-- Brandon
More information about the Catalyst
mailing list