[Catalyst] Dispatching based on path and host/domain

Curtis Fletcher curtis.fletcher at pharmaventures.com
Tue Apr 22 10:22:55 BST 2008


> -----Original Message-----
> From: Matt Pitts [mailto:mpitts at a3its.com] 
> Sent: 22 April 2008 03:06
> To: The elegant MVC web framework
> Subject: RE: [Catalyst] Dispatching based on path and host/domain
> 
> > You've probably heard this before on the list, but...
> > 
> > Ideally, you shouldn't have enough code in your Controllers 
> to justify
> > "sharing" the app across domains that need different functionality.
> The
> > meat of the app should be in the Models, then you can just run
> multiple
> > Cat apps - one with Cart controllers and one without - that use the
> > same
> > "shared" Models.

Absolutely right, my controllers are much, much too heavy. This all came
from "learning as I went" and I distinctly remember the point at which I
gave up trying to put business logic in the model. At the time there
seemed to be minimal if any examples that illustrated the model being
anything other than an adaptor for DBIx::Class::Schema so I just figured
I was mistaken in my attempt to do so.

So could I ask, now I know a little more than I did then, Does everyone
here subclass DBIx::Class::Resultset (a-la
http://catalyst.perl.org/calendar/2007/16) for their business logic
specific methods? (Well those that use DBIx::Class as their model
anyway)

Thanks for the Help Matt, it's certainly made me think.



More information about the Catalyst mailing list