Monday, June 25, 2012
MVC over page centric
MVC is a design pattern
It contains two models:
MVC Model 1
MVC Model 2
Struts framework implements MVC Design Pattern.
Struts can implement Model 1 and Model 2
the important features of MVC1 architecture:
(1) HTML or JSP files are used to code the presentation.
JSP files use java beans to retrieve data if required.
(2)MVC1 architecture is page-centric design all the business and processing logic means any JSP page can either present in the JSP or may be called directly from the JSP page.
(3)Data access is usually done using Custom tag or through java bean call.
Therefore we can say that in MVC1 there is tight coupling between page and model
the important features of MVC2 architecture
(1)This architecture removes the page-centric property of MVC1 architecture by separating Presentation, Control logic and Application state
(2)In MVC2 architecture there is one Controller which receive all request for the application and is responsible for taking appropriate action in response to each request.
Second one is Model which is represented by JavaBeans, business object, and database.
Third one is View or is JSP page it takes the information provided by Controller and Module and presents it to user.
in MVC-I all the view,control elements are implemented using Servlets
in MVC-II the view is implemented using JSP,and the controller is implemented using Servlets,as JSP provides better user interface than Servlets
http://forums.sureshkumar.net/java-technologies/11167-struts-difference-between-mvc1-architecture-mvc2-architecture.html
No comments:
Post a Comment