Wednesday, June 18, 2008

The difference between MVC and MVC 2(MODEL 2) ?

MVC was a first generation approach that used JSP pages and the JavaBeans component architecture to implement the MVC architecture for the Web. HTTP requests are sent to a JSP page that implements Controller logic and calls out to the “Model” for data to update the “View.” This approach combines Controller and View functionality within a JSP page and therefore breaks the MVC paradigm. MVC1 is appropriate for simple development and prototyping. It is not, however, recommended for serious development.

MVC2 is a term invented by Sun to describe an MVC architecture for Web-based applications in which HTTP requests are passed from the client to a “Controller” servlet which updates the “Model” and then invokes the appropriate “View” renderer-for example, JSP technology, which in turn renders the View from the updated Model.
The hallmark of the MVC2 approach is the separation of Controller code from
content. (Implementations of presentation frameworks such as Struts, adhere to the MVC2 approach).

copied from sun forums site

No comments: