[Catalyst] Catalyst + Ajax
Brandon Black
blblack at gmail.com
Fri Dec 2 02:31:33 CET 2005
On 12/1/05, Phil Mitchell <phil at 2people.org> wrote:
> On 12/1/05, Brandon Black <blblack at gmail.com> wrote:
> > 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.
>
> There's decent prototype docs here:
> http://www.sergiopereira.com/articles/prototype.js.html
>
> which you probably know about... Is there a lot of stuff that's not
> documented there?
>
Yeah that's about the best reference I've found, and it would probably
help a lot to link that in the C::P::Prototype and/or HTML::Prototype
docs (as Chisel noted in another reply). You have to give the guy
major credit for even trying to document it, but it's a reverse
engineering effort, and even those docs are lacking in a few areas.
They do cover the entire prototype.js API as far as I can tell, but
they don't cover the script.aculo.us stuff (which is only
slightly-better documented and exampled), and they fail to convey a
lot of things about how exactly one can build upon and extend
Prototype's javascript (although I suppose perhaps those things would
be obvious to a more seasoned javascript developer than me).
Try subclassing any of the advanced objects (Ajax.PeriodicUpdater, or
Autocompleter, for example) to extend their functionality, or making
use of Prototype to subclass and add functionality to the browser's
Element class, and you quickly run into very uncharted territory. I
kinda figured most of it out reading the source, but there was a lot
of trial and error involved, since Javascript OO and syntax on this
level of complexity makes about zero sense to me.
-- Brandon
More information about the Catalyst
mailing list