MVCR pattern (was Re: [Catalyst] Bing!)
Perrin Harkins
perrin at elem.com
Thu Aug 11 17:04:44 CEST 2005
On Thu, 2005-08-11 at 10:40 -0400, David Storrs wrote:
> > It fits just fine. The original definition of "Model" is basically
> > the
> > business logic.
>
> My point is that the definitions seem to have changed, and therefore
> our approaches may need to change.
Common usage in Catalyst and other web frameworks is to call the data
access objects the model and the business logic the controller.
> I'll ask more
> directly: Perrin, what are you putting in your Controllers?
I'm putting the logic for translating web actions into method calls
there. Most of the significant application logic that isn't about
screen flow is in model classes, some of which are data access objects
and some of which are not. I also put form validation there, even
though it doesn't logically fit there, because Data::FormValidator and
HTML::FillInForm work so well there.
> > The names are not that important.
>
> I disagree. Names are symbols.
Let me rephrase that: There is not a real consensus on what the names
should be and if you choose some names it's unlikely that you'll be able
to convince everyone to use them. I tried to use more literal names in
my MVC slides (data access objects, templates, URI mapping, actions) but
they still have to be explained to new listeners.
- Perrin
More information about the Catalyst
mailing list