[Catalyst] ways to do stuff and why

Len Jaffe lenjaffe at jaffesystems.com
Sat Aug 19 17:44:58 CEST 2006


On 8/19/06, Matt S Trout <dbix-class at trout.me.uk> wrote:

> I think the main bone of contention here is that Len is referring to his
> persistence layer as the model, whereas I consider it to just be a
> persistence
> layer - stuff like Model::DBIC::Schema is really only there for simple
> apps
> where what you're modeling *is* the database. 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.


Right.  My "Model" is just the data structure holding the raw data.  Adding
business domain logic is the bailiwick (love that word) of my Controllers.

I also think that a contention point is whether you, I or anybody else align
our
MVC strictly with Catalyst Ms, Vs, and Cs.  Obviously, we've not reached a
consensus, but I think everybody's method has merit, and the key is to work
in your comfort zone, and change when you feel pain.

Whether the Shopping Cart is in the Model, or in the Controller, is an
execise in semantics.  It stiil needs to get it's data from someplace
eventually.  Which is why I like to use go_get_data() methods in the
business object.  The implementation of go_get_em() is data store specific,
but the shopping cart allocates its items abstractly.  Same model as
session/authn/authz. Its the same principle of DBI/DBD.

I propose a poker tounament, at Catalyst Expo 2007 (held in Las Vegas
Nevada, USA, or on the French Riviera). Winner gets to define what MVC
really means, and what goes where.

Len.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060819/c7d4c29e/attachment.htm 


More information about the Catalyst mailing list