Struts2
Struts2 is actually not a stranger to the Web frameworks, Struts2 is Webwork design ideas as the core, absorb Struts1 advantages, so that the Struts2 is the product of the integration Struts1 and Webwork.
MVC Description: Struts2 WebWork is compatible with the MVC framework Struts1 and since, that the MVC framework on the MVC framework will have to make a brief, limited to a brief, if want to learn more about MVC can view the related knowledge document, or to find a Struts1 books, I believe the above is not rare on the length of MVC. Closer to home, in fact, Java the present situation of these frameworks, its ultimate goal is to contact coupling, whether Spring, Hibernate or the MVC framework, are designed to increase contact with coupling reuse. MVC contact with the coupling between View and Model. MVC consists of three basic parts: Model, View and Controller, these three parts work together to minimize the coupling to increase the scalability of the program and maintainability. Various parts of the implementation technology can be summarized as follows:
1) Model: JavaBean, EJB's EntityBean
2) View: JSP, Struts in TagLib
3) Controller: Struts the ActionServlet, Action
To sum up the advantages of MVC mainly about aspects:
1) corresponds to multiple views can be a model. By MVC design pattern, a model that corresponds to multiple views, you can copy the code and the code to reduce the maintenance amount, if model changes, but also easy to maintain
2) model the data returned and display logic separate. Model data can be applied to any display technology, for example, use the JSP page, Velocity templates, or directly from Excel documents, etc.
3) The application is separated into three layers, reducing the coupling between the layers, providing application scalability
4) The concept of layers is also very effective, because it put the different models and different views together, to complete a different request. Therefore, the control layer can be said to include the concept of user requests permission
5) MVC more software engineering management. Perform their duties in different layers, each layer has the same characteristics of the components is beneficial tool by engineering and production management of program code
Struts2 Introduction: Struts2 Struts1 development appears to come from, but in fact Struts1 Struts2 and design ideas in the framework of the above is very different, Struts2 WebWork's design is based on the core, why not follow the Struts1 Struts2 design ideas After all, Struts1 in the current enterprise applications market is still very big in the, Struts1 some shortcomings:
1) support the performance of a single layer
2) coupled with the Servlet API serious, this could be the Execute method from the Action Statement which you can see them
3) The code depends Struts1 API, there are invasive, this can be written when the Action class and look out FormBean, Action Struts in Action class must implement
The reason for Struts2 WebWork's design for the core point is the recent upward trend of WebWork and play WebWork not Struts1 above those shortcomings, more MVC design ideas, and more conducive to reuse the code. Based on the above
上一页 [1] [2] [3] [4] [5] [6] [7] 下一页