The relationship between Model, View and Controller confuses me.
This section shows the View to Controller arrow shape, the Controller to Model arrow and the Model to View arrow:
http://www.codeproject.com/Tips/31292/MVC-vs-MVP-How-Common-and-How- Different
However, this section shows the double arrow between Model and View; double arrow between view and controller; and arrow from controller to model:
http://www.codeproject.com/Articles/288928/Differences-between-MVC-and-MVP-for-Beginners
Finally, this section shows an arrow from View to Model, an arrow from Controller to Model, and an arrow from Controller to View:
http://www.w3schools.com/aspnet/mvc_intro.asp
I have a few questions:
- Which relationship is right?
- Should business logic be handled in a controller or model? I read somewhere that business logic cannot be hosted in a controller (ASP.Net MVC)
- If the controller passes the object to the view, is this object owned by the model?
- How does a view retrieve data directly from a model? Does it have a link directly to the model, or does it interact with the model coming from the controller?
source
share