[Catalyst] mapping application flow into a MVC framework (long)

Adam Jacob adam at stalecoffee.org
Mon Jul 11 21:07:13 CEST 2005

On Jul 11, 2005, at 11:02 AM, Phil Mitchell wrote:
>> A more general observation is that a web app is a
>> series of states. What gets output depends on what
>> state you are in. Or, perhaps, pieces of the view of a
>> web app are dependent on what context that piece of
>> the view is in. For example I might want to view a
>> list of servers in the context of belonging to a
>> specific customer. Or I might to view a list of
>> servers in the context of having searched for servers
>> in a certain location. The common thing here is
>> listing servers but which servers are listed depends
>> on how I got there. I'm not sure how to handle this
>> flow in a MVC way.
> Just a guess, but it sounds to me like you may have too much code in
> your C classes. The way I think about it is that the controllers are
> for managing the request/response/validation cycle, and all the
> domain-specific stuff (related to servers, customers, etc.) should get
> pushed back to your M classes. Your C asks the model for a list of
> servers, the model gives back the right list, and C hands it off to
> the V for display.

If what you are saying is:

"Controller calls the Model, passing in the relevant bits of  
information necessary for the Model to return the right data."

Than I agree with you. :)

If you have the Model doing some magic in the background, so that it  
auto-magically knows what data I am asking for from the controller, I  

The trick being, I see all the flow-control handled in the  
Controller... so the View and the Model are both relatively "thin"  
classes, compared to the fairly thick controller.


More information about the Catalyst mailing list