On Tue, Apr 22, 2008 at 10:22:55AM +0100, Curtis Fletcher wrote: > > -----Original Message----- > > From: Matt Pitts [mailto:[EMAIL PROTECTED] > > 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.
Disagree. Just because you want to minimise code in the controller doesn't mean you don't want to consider this to be the 'same app'. You're making a valid design point, but then jumping from there to an invalid one by ... well, handwaving so far as I can see. > 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) No, generally they don't. That's why they end up with controllers full of crap. Anybody trying to write -actual- MVC code with Catalyst+DBIC will have resultset classes though :) -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/ _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/