This is not MVC

September 19, 2007 at 4:25 am (Voyage Journal)

this-is-not-mvc1.jpg

How a real implementation of the MVC pattern should be:

mvc-explained.jpg

1 – The user requests to see something.
2 – A controller handles the event.
3 – The controller decides which view is appropiate.
4 – The view access DIRECTLY the model to gather the resources needed to build the view.

Why should it be this way?
If the controller acts as a proxy between the model and the view, an important change in contents displayed is not possible without a change in the controller, which beats the whole point of having the system divided in independent subsystems.

Freaks-on-Rails: capisci?

Post a Comment