[Catalyst] ways to do stuff and why
Matt S Trout
dbix-class at trout.me.uk
Sat Aug 19 18:34:06 CEST 2006
A. Pagaltzis wrote:
> * Matt S Trout <dbix-class at trout.me.uk> [2006-08-19 16:55]:
>> If you're modeling a domain, then your Model::* stuff should be
>> the model of the domain, and whether or not said model happens
>> to use DBIC stuff as its persistence store should be merely an
>> implementation detail that the Controller never sees.
>
> +1
This is going to be baked into our new layer-atop-Catalyst that we're working
on, along with something akin to the Jifty Action stuff for mutations of the
model (although without the form handling attached directly, see next para).
So is abstracting out the view-ish logic into a separate layer (think
HTML::Widget on steroids but generalised and with the rendering separate -
we'll be supplying a standard set of TT templates as the default way of
rendering 'em).
The controllers are looking pretty bare - all they really do is grab bits from
the model and instantiate viewport objects with the model objects, so you end
up with the display logic, skinning, model and navigation all separate. Seems
to work pretty nicely.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list