jump to navigation

MVCC: Model-View-Controller-Confusion February 3, 2010

Posted by Khawarizmiya in IT, MVC.
add a comment

The Model-View-Controller (MVC) is an architectural pattern used in web development frameworks to separate the application logic implementation (Model) from the GUI design and presentation (View), enabling independent development, testing and maintenance of each.

Model View Controller


MVC web application frameworks include Oracle’s ADF Framework, Microsoft’s ASP .NET MVC Framework, PHP Faces, and many others.

The Question is..

Can you really completely develop in your Model logic in isolation from the View representation – and I don’t mean the usage of standard ways of exposing Model project methods to the View, using a Data Control, for instance, when necessary- ?

What I mean is the following.. You come across situations where you need to access the View Session for example from your Model project to obtain a certain value necessary for a Model project method. Ideally, you shouldn’t be having any methods that require View-Session data!  But due to shortages/limitations in the Framework we’re using now, that -with no doubt- cannot provide us with what we need without having to use such workarounds, we had to find a way to cross the boundaries.

SURPRISINGLY..

.. There are multiple ways provided by the framework to access the View project from the Model project.  Framework Consultants tell you that once you start considering the usage of such methods, then you must be doing something wrong. Well, pardon me, but if it’s wrong, then why is it there in the first place?

What Would You Do?

Would you re-visit your Application business and see how to enable the separation of the Model logic implementation from the View implementation?

Would you re-engineer your Data Model?  Or revise the technical approach you took into developing the required business?


OR.. SIMPLY..

Would you just simply use those methods provided for you to actually cross the MVC boundaries?  ;-)