[Catalyst] Jemplate and AJAX woes... [Bump -anyone??]
robertkrimen at gmail.com
Sat Aug 16 22:52:32 BST 2008
On Sat, Aug 16, 2008 at 12:45 PM, Ian Tegebo <ian.tegebo at gmail.com> wrote:
> After a friend had recommend jQuery, I've found I really like it but
> had been under the impression that I wouldn't be able to use Jemplate
> at the same time.
In fact, the latest Jemplate release has the option of using jQuery (or YUI)
AJAXy stuff (get & post).
> A second read of Rockway's Editable Addressbook in
> chapter 7 of the Catalyst book leaves me wondering how TT, Jemplate,
> and jQuery would best "get along". Is it the case that
> Catalyst::View::Jemplate exists to reduce HTML munging within
Jemplate in general exists for that purpose. The problem with doing heavy
HTML/UI-lifting browser-side is that you end up doing things like:
var html =3D '<div class=3D"' + styleClass + '"><a href=3D"' + uri ...
It quickly becomes unwieldy. Jemplate basically creates methods that do the
above (and more).
use a widget system that may not have the specific look & feel you're going
> If so, then is it correct to think of jQuery, Jemplate, and the
> Catalyst::Controller::REST interface as kind of a browser-side MVC?
jQuery is a really nice way of manipulating DOM + some convenience
functions: no MC
involved (*maybe* the V part)
MC involved (just the V part)
I suppose you can think of C::C::REST as the data-layer for your model, but
then you're still missing the Controller
> I'm imagining the REST calls through jQuery as accessing the "model"
> while qQuery serves as the controller via its selectors finally
> rendering its "view" through Jemplate.
Sounds about right, but it's more like making API calls to your C::C::REST
> BTW, it appears Catalyst::View::Jemplate broke after Jemplate >=3D 0.21
> changed the behaviour of Jemplate::runtime_source_code (see RT 35609,
> 37813). What versions are you running?
I'll try and take a look to at Jemplate and see what's going on. What you
is just do a Jemplate compile via a Makefile or something and then serve the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst