1. Decouples the model, view and controllers, to increase flexibility and reuse.
2. Easier support for new types of clients.
3. Makes it possible to easily divide work between software developers and UI designers.
4. Ease of maintenance even on huge code bases.
All these are excellent benefits for our projects but in my opinion the real benefit of this pattern is that it makes you work in a very organized way. The system architecture is so clear that you know exactly the steps you need to do in order to implement the new functionality.
Once you are working with a clear architecture and organized development form you get:
1. Easy to understand and maintain the code, even for new developers.
2. Easy to add new functionality (just the same way other modules are developed).
3. Better and faster to track errors and bugs.
Just try to develop a simple web application without using this pattern and you see how each and every page and module look and behave differently. Class names don't have conventions and it is hard to understand the boundaries of different layers. Of course if you are working alone this is not a problem but in big teams each developer has it's own style and capabilities.. Working with MVC framework make is easy to collaborate in big teams by making clear organization of the components and makes all team members work by the rules of the framework.

Is JSF a MVC framework?
ReplyDeleteYes, JSF is also a MVC framework. It has many more aspects such as UI component model, validations, ajax support and many more.. but at it's core it's a MVC driven framework.
ReplyDeleteHowever I prever model-view-presenter pattern. It is a compromise between flexibility of MVC and ease of use of formbuilder solutions.
ReplyDeleteIn fact many people when are talking about MVC have MVP in their minds.
As for JSF, it's of course MVC, but slightly modified: there's no clear distinction between model and controller: backing beans are models, but also have something from controllers (for example can decide which view do display).
benifit?
ReplyDeleteI just finally figured out the Model View Controller pattern. I even got a small model of it working in a Windows Forms app I created from scratch. Pretty cool how the form is sitting there and gets populated from the Presenter - and the Form is pretty dumb.
ReplyDelete