S2SH introduction, s2sh framework
Struts2 Introduction
Struts2 is developed based on WebWork. Compared with struts1, the reason for choosing struts2 is: ① Struts1 requires the Action class to inherit an abstract base class, the Struts 2 Action class can implement an Action interface or other interfaces to make optional and customized services possible. Struts2 provides an ActionSupport base class to implement common interfaces. ② Struts1 Action depends on Servlet API while Struts 2 Action does not depend on container, allowing Action to be tested independently from container; ③ Struts1 supports a separate Request Processors (lifecycle) for each module, but all actions in the module must share the same lifecycle, while Struts2 supports Interceptor Stacks) create different lifecycles for each Action. The stack can be used with different actions as needed. ④ Struts also supports configuration internationalization, making conversion between different languages easy.
Spring Introduction
Spring is an open-source framework. It is created to solve the complexity of enterprise application development. In this project, spring is mainly used to achieve loose coupling by using its IOC container (that is, "control inversion. In terms of transaction processing, we also use SPRING to assemble proxy settings. SPRING also provides support for AOP programming. Aspect-Oriented Programming allows cohesion development by separating the application's business logic from system-level services (such as transaction management. Application objects only implement the business logic they should do. They are not responsible for other system-level concerns, such as log or transaction support. In this project, the org. springframework. AOP. framework. autoproxy of aop is used to automatically create a proxy to complete the transaction.
Hibernate Introduction
Hibernate is an open-source object relationship ing framework that encapsulates JDBC objects in a lightweight manner, so that Java programmers can use the object programming thinking to manipulate the database as they wish. Complete the task of data persistence. Because hibernate Persistence technology is used in this project, hibernateTransactionManager is used for transaction management.
Introduction to S2SH integration framework
Struts is responsible for receiving the data submitted by forms on the webpage at the web layer ActionFormBean, processing the data through the Action, and then Forward to the corresponding webpage.
Spring is responsible for business layer management, that is, Service (or Manager). service provides a statistical call interface for action and encapsulates the DAO of the persistent layer. You can also write your own business methods. Spring is responsible for unifying the javabean management method and Clear transaction management. At last, spring is integrated with Hiberante.
Hiberante is responsible for the persistence layer and database crud operations. hibernate provides OR/Mapping for the persistence layer. It has a set of. hbm. xml files and POJO, which correspond to tables in the database. Then define DAO. These are classes used to deal with databases, and they use PO.
In the struts + spring + hibernate system, the object calling process is: jsp-> Action-> Service-> DAO-> Hibernate. The data flow direction is that ActionFormBean accepts user data. Action extracts the data from ActionFromBean and encapsulates the data into PO. Then, it calls the Bean class at the business layer to complete various business processing and then forward. After receiving this PO object, the business layer Bean will call the DAO interface method to perform persistence operations.
Who can help me introduce a (s2sh) Project Integrated Development book?
It depends on what depth you want to know. If you want to know more about it, we recommend that you read it separately. A book that fully writes ssh is basically a dumb book. To be honest, the books written by foreigners are really good, such as hibernate practice.
If you want to speed up ssh usage, you can buy a book that is available for ssh in a short period of time.
But one thing is that the speed is never the best. It is the most important thing for all books to be digested slowly.
Introduce a s2sh book. The better the case is.
Li Gang's lightweight java ee Enterprise Application Practice Integrated Development