Talk:Model view controller

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 5: Line 5:
  
 
[[User:Lindsay | Lindsay Kay]]
 
[[User:Lindsay | Lindsay Kay]]
 +
 +
 +
----
 +
 +
 +
My understanding of the MVC has been that it is a message passing system. The way it was explained today with a controller being a strategy possessed by the view seems wrong to me. Surely the controller should handle all communication between the model and the view by observing both of them. Shouldn't the controller provide a abstraction layer so that the view knows nothing of the model's interfaces? For example if we produce a program that has a GUI then we are required to make the application web accessible we would have to rewrite a lot of logic. Or the other direction we have a lovely web2.0 interface that manages students and we replace the model to now manage farms. If the interfaces that a farm presents are different then the view has to be changed as well as the controller as the view observes the model. Please point out the flaws in my logic --[[User:AlexGee|AlexGee]] 03:04, 27 July 2009 (UTC)
 +
 +
[[Image:Mvcdis.JPG|left|thumb|my old idea of MVC]]

Revision as of 03:04, 27 July 2009

Hierarchical-MVC

When your application gets big, the model, view or controller component may well become a Big ball of mud. A popular fix is to go one step further and apply Hierarchical-MVC, which attempts to make MVC scalable.

Lindsay Kay




My understanding of the MVC has been that it is a message passing system. The way it was explained today with a controller being a strategy possessed by the view seems wrong to me. Surely the controller should handle all communication between the model and the view by observing both of them. Shouldn't the controller provide a abstraction layer so that the view knows nothing of the model's interfaces? For example if we produce a program that has a GUI then we are required to make the application web accessible we would have to rewrite a lot of logic. Or the other direction we have a lovely web2.0 interface that manages students and we replace the model to now manage farms. If the interfaces that a farm presents are different then the view has to be changed as well as the controller as the view observes the model. Please point out the flaws in my logic --AlexGee 03:04, 27 July 2009 (UTC)

my old idea of MVC
Personal tools