[Catalyst] ways to do stuff and why

Matt S Trout dbix-class at trout.me.uk
Fri Aug 18 18:33:15 CEST 2006

John Napiorkowski wrote:
> You may want to review the thread, "Plugins vs. Base Controllers" to see what some of the lead architects have to say on the issue at least regarding 2/3 and 4.  I think choosing between 2/3 is really a matter of what can be reused usefully and what is overkill design.  For 1 I am not sure but I only put a little logic in the models for stuff directly related to the model, like to encapsulate very frequently used queries.  Not sure what other people have to say.  Purists I think don't want any logic in the model, from what I gather.

Eeeeek, not at all. The model should encapsulate *all* business logic and 
similar - it should be a model of the domain with which the app interacts. The 
Controller should be as thin a layer as possible whose sole purpose is to 
arbitrate between the model's view of reality and the user interface (i.e. the 

      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