Tuesday, June 15, 2010

Why we need MVC framework?


Why we need MVC framework?

Web applications differ from conventional websites in that web applications can create a dynamic response. Many websites deliver only static pages. A web application can interact with databases and business logic engines to customize a response.

Web applications based on JavaServer Pages sometimes commingle database code, page design code, and control flow code. In practice, we find that unless these concerns are separated, larger applications become difficult to maintain.

One way to separate concerns in a software application is to use a Model-View-Controller (MVC) architecture. The Model represents the business or database code, the View represents the page design code, and the Controller represents the navigational code.

The Struts framework is designed to help developers create web applications that utilize a MVC architecture.
In Struts 2, MVC are implemented by the action, result, and FilterDispatcher.

Resources for  Struts MVC

Spring's Web MVC framework is designed around a DispatcherServlet  that dispatches requests to handlers, with configurable handler mappings, view resolution, locale and theme resolution as well as support for upload files.

Resources for  Spring MVC