>For example, in MVC the view has a direct reference to the model and the
>model an indirect reference to a view.
>This allows for scenarios like 2-way data bindng.
This is what I know as the Supervising Controller, whereas teh Passive View doesn't require this link.
>That doesn't make much sense. In terms of re-use, the primary scenario for re-use
>across web and desktop apps would be the Model.
>That is the re-use scenario, not the controller.
DoX and DoY can call back into the controller and do some other stuff and finally call to render some view.
When I implement an ASP.NET I don't need to "remember" to write this. I just implement the interface defined by the controller. That's the model dictating my application logic, but I need to re-use more than a model.
Let's give another example. Suppose I have a wizard where each step asks the user for a series of operations based on the input and redirects them to different steps in the wizard. IF I implement this logic in the controller I write it once and re-use everywhere.
frparel
0 Points
15 Posts
Re: MVC Architecture
Dec 11, 2007 08:01 PM|LINK
>For example, in MVC the view has a direct reference to the model and the
>model an indirect reference to a view.
>This allows for scenarios like 2-way data bindng.
This is what I know as the Supervising Controller, whereas teh Passive View doesn't require this link.
>That doesn't make much sense. In terms of re-use, the primary scenario for re-use
>across web and desktop apps would be the Model.
>That is the re-use scenario, not the controller.
In controller:
If (Model.CustomerAmount < 0) {
DoX;
} else {
DoY;
}
DoX and DoY can call back into the controller and do some other stuff and finally call to render some view.
When I implement an ASP.NET I don't need to "remember" to write this. I just implement the interface defined by the controller. That's the model dictating my application logic, but I need to re-use more than a model.
Let's give another example. Suppose I have a wizard where each step asks the user for a series of operations based on the input and redirects them to different steps in the wizard. IF I implement this logic in the controller I write it once and re-use everywhere.