On 8/19/06, Matt S Trout <[EMAIL PROTECTED]> 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.

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to