MVCR pattern (was Re: [Catalyst] Bing!)

Perrin Harkins perrin at elem.com
Thu Aug 11 22:22:37 CEST 2005


On Thu, 2005-08-11 at 12:34 -0400, David Storrs wrote:
> Could you  
> explain why you feel that the Model component of the MVC web  
> framework should not represent the interface to the conceptual Model  
> (which is the business logic in your external modules)?

Because "conceptual model" eq "Model component".  One can't point to the
other because they are the same thing.  I guess I'm not quite following
where your question is coming from.  In Catalyst (and Rails) examples,
some of the conceptual model is often implemented in the code referred
to as the controller, so maybe that's the source of confusion.  That's
one way to go, but like I said before, you are essentially collapsing
the higher level application logic into the controller then.  It's very
common, and not bad as a practical compromise, unless you know you'll
need to use the "add item to shopping cart" code from a command-line
app, in which case it's better to separate it.  (Note that there are
ways to call Catalyst controller methods from command-line, so that's
another way to solve the issue.  That would essentially make your
Catalyst controller a part of the model, despite how it is named.)

> Monosyllabic assertions aren't very helpful toward  
> any of those goals.

Sorry, I wasn't trying to be rude.  I thought you were looking for a
straightforward answer to your question.

- Perrin




More information about the Catalyst mailing list