| Frameworks and design Patterns are very important technologies for software which are reused in J2EE. Framework can raise productivity of software by reusing. Almost all frameworks use one or more design patterns. Those problems challenging developers are how to choose frameworks to build the appropriate architecture for enterprise application,and how to make each application layer interact in loose coupling way.As is stated above,this thesis leads into new frameworks—Webwork,Spring and Hibernate after investigations of current Web application mu1ti-tier systems. Webwork is components and reuse of code-pull mode of J2EE Web MVC framework. Spring which is designed for solving the complexity of developing enterprise application program is a J2EE 1ightweight framework. Hibernate is an open source persistence framework,it reduces the complexity of developing database and make system portable. The thesis did deep research on realization principle of these three frameworks,and analyzed each framework's function in web application layer. Then the architecture is integrated with the three frameworks in order to be suitable for enterprise web application developing. The integrated architecture divides three layer: view layer,business layer and persistence layer. Webwork controls view layer. The architecture hands business layer managing to Spring,also Spring controls data access object comes from persistence layer. The work of Hibernate is to make data persistence.An example of BOSS is introduced to illustrate the process to build a practical item with the architecture integrated Webwork,Spring and Hibernate frameworks. The result shows that first,the Interceptor mechanism of Webwork makes the coupling of business logic and control logic reduced greatly. Second,Spring framework based on IoC and AOP mechanism avoids strong intrusiveness of EJB to business logic,last,the architecture integrated Hibernate achieves the function of O/R mapping simply,reducing the complexity of developing. The system doesn't depend on platform and has the characteristics of high maintainability,expansibility,and reusability. |