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

Phil Mitchell seasprocket at gmail.com
Mon Jul 11 20:02:26 CEST 2005


> 
> 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.

I know there was a discussion of MVC a while back on this list, which
came to a different conclusion. I'm curious if people strongly
disagree with the above...



More information about the Catalyst mailing list