[Catalyst] Ajax

Matt S Trout dbix-class at trout.me.uk
Sun Aug 5 11:26:10 GMT 2007


On Sat, Aug 04, 2007 at 10:44:30PM -0400, Javier E. Perez P. wrote:
> El vie, 03-08-2007 a las 10:47 +0300, Octavian Rasnita escribió:
> > Hi,
> > 
> > Which of the Ajax modules do you recommend using in a Catalyst app?
> > I am interested especially to know which of them work better with 
> > Template-Toolkit and DBIx::Class.
> > 
> 
> I particularly use jQuery, the way that i pass the data from the
> controller to the view is like this
> 
> my $obj = [ map { { id => $_->id,  name => $_->name} }
> $c->model('tegzDB::Author')->search({ name => { like => '%javier
> %' } }) ] ;
> 
> $c->res->body(objToJson($opciones));

Always, -always- use View::JSON rather than doing the serialisation direct.

Otherwise you're writing an 'MC' system not 'MVC' and claco'll start making
hammer time jokes again.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/                    http://www.shadowcat.co.uk/ 



More information about the Catalyst mailing list