Research of Structure Integration based on Struts and Hibernate 1.Introduction Following the rapid development of network technique, the distributed enterprise Web application technique is becoming mature day by day. With the extensive application of Java technology, the Web application system of Java 2 Platform Enterprise Edition (J2EE) is accepted by the great majority companies gradually for its stratification and the independence of platform. J2EE has been testified to be a trusting enterprise technique of software development and supported by many important firms of IT industry. But J2EE has some disadvantages, for instance, the high price, long periods and complex realization which bring from Enterprise Java Bean(EJB).
Now Struts has already become the most popular framework based on Java language because of bringing the excellent layer pision to Web application. At present, a few large-scale firms embed Struts in J2EE of the assembly development implement. But in the model part of Struts the realization of the interaction between system and database is not ideal. While Hibernate provides the mapping mechanism from Java class to datasheet, the data inquiring and recovering mechanism and so on, and it realizes the object permanence of data layer. Hibernate gets rid of the disadvantages of operating the relational database in system directly.37891
Therefore, adopting the multi-layer framework of integration based on Struts and Hibernate can bring the both merits to play sufficiently which solves some disadvantages of the traditional J2EE well.
2.Struts Framework Based on MVC
In the traditional Web application, Java Server Pages(JSP) pages are responsible for handling all things, for example, receiving requests, executing business logics, choosing the next page. These complicated things may lead to chaos of JSP pages’ codes and be harmful for the extension and maintenance of pages. The Model-View-Controller (MVC) mode separates the programming codes into three different areas, which has solved the above problem. MVC can realize J2EE application system's stratification and the loose coupling of three layers or multilayer, and it is a realization way of orienting dynamic content. The MVC mode pides application into three core components of Model, View and Controller.
Struts is a realization of MVC. It is an open source Web application framework and uses Servlet and JSP marks that belong to the J2EE norm as a part of the realization. Struts inherits MVC characteristics and realizes some corresponding changes and extension according to J2EE traits. Struts separates Java codes of JSP by Java Bean and Action class to be the MVC mode, transmits data among the three partitions of Model, View and Controller, demonstrates the connection between various classes and JSP pages by configuration files finally and it intends to realize the separation of presentation layer, business layer and data layer. 
3.Hibernate Framework Based on ORM
Working with both the object-oriented software and the relational database is a complicated task with Java Database Connectivity (JDBC) because there is mismatch between how data is represented in objects versus relational database. So with JDBC, developers have to write pure the Structured Query Language (SQL) statements to map an object model's data representation to a relational data model and its corresponding database schema.
3.1. Introduction of Hibernate
Hibernate is a flexible and powerful Object-Relational Mapping (ORM) solution to map Java classes to database tables. It is a powerful, high performance object-relational persistence and query service. Hibernate allows developers to express queries in its own portable SQL extension (Hibernate Query Language (HQL)), as well as in native SQL, or with an object-oriented criteria and example Application Programming Interface(API). Hibernate itself takes care of this mapping using XML files so developers don’t need to write code for this.
Hibernate is an open source and it is free to use for both development and production deployments, which is a bridge between Java application and relational database and takes charge of mapping between Java objects and relational data. The inside of Hibernate packs the operation of accessing database by JDBC, which provides API of object-oriented database access to upper layer application. So developers can use the object programming thought to operate database sufficiently, caring for the bottom database structure unnecessarily.
上一篇:电子商务网站的设计英文文献和中文翻译
下一篇:宽带互联网服务英文文献和中文翻译

AngularJS技术介绍英文文献和中文翻译

开关电源水冷却系统英文文献和中文翻译

减数分裂和基因重组英文文献和中文翻译

太阳能最大功率点追踪和...

移动码头的泊位分配问题英文文献和中文翻译

虚拟船舶装配集成建模方...

中学生科学探究中对等论...

浅谈高校行政管理人员的...

提高教育质量,构建大學生...

酵母菌发酵生产天然香料...

AES算法GPU协处理下分组加...

浅论职工思想政治工作茬...

上海居民的社会参与研究

基于Joomla平台的计算机学院网站设计与开发

压疮高危人群的标准化中...

STC89C52单片机NRF24L01的无线病房呼叫系统设计

从政策角度谈黑龙江對俄...