[Catalyst] Controllers vs Models

David Storrs dstorrs at dstorrs.com
Thu Jun 2 17:47:43 CEST 2005


I'm a little confused about Catalyst's separation of Controller vs  
Model code.  My understanding of the strictest version of the MVC  
pattern is:

     - The Controller accepts input from the outside (usually the  
user) and causes changes to the Model.
     - The Model stores state and, when updated by the Controller,  
informs the View that it needs to redraw.
     - The View displays the current state of the Model.

Is this more-or-less correct, or have I misunderstood the pattern?

I realize that, in real-world implementations, these concerns are  
less completely separated...e.g. the Model may cause changes in its  
own state, and communication may flow in more paths than those listed  
above.

What do the rest of you see as the dividing line between a  
Catalyst::Model and a Catalyst::Controller object?  When you are  
creating a new object, how do you decide which hierarchy it belongs in?


--Dks



More information about the Catalyst mailing list