基于SSH架构的交流社区毕业设计外文翻译.doc
《基于SSH架构的交流社区毕业设计外文翻译.doc》由会员分享,可在线阅读,更多相关《基于SSH架构的交流社区毕业设计外文翻译.doc(14页珍藏版)》请在三一文库上搜索。
1、毕业设计说明书英文文献及中文翻译班 级: 学号: 姓 名: 学 院: 专 业: 指导教师: 2外文参考文献原文1 Struts Framework Based on MVCIn 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
2、 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 systems stratification and the loose
3、coupling of three layers or multilayer, and it is a realization way of orienting dynamic content. The MVC mode divides 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 th
4、at 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
5、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. The Struts structure is shown in Figure 1.The Model contains the business log
6、ic that exchanges data with a persistence layer. The View is in charge of producing what is directly visible to the user, e.g. web pages. The Controller is the layer that receives requests from clients, determines what business logic takes place and where to go next. In the Struts framework, the Mod
7、el uses Java classes for the business logic. The View can be implemented with JSP and the Tag lib of Struts. The Controller is a J2EE component known as Servlet, more specifically an ActionServlet object, which determines what or when logic gets executed and where the control should get directed.Fig
8、ure 1. Struts structure 2 Hibernate Framework Based on ORMWorking 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 J
9、DBC, developers have to write pure the Structured Query Languag (SQL) statements to map an object models data representation to a relational data model and its corresponding database schema.2.1 Introduction of HibernateHibernate is a flexible and powerful Object-Relational Mapping (ORM) solution to
10、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)3, as well as in native SQL, or with an object-oriented criteria an
11、d example Application Programming Interface(API). Hibernate itself takes care of this mapping using XML files so developers dont 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 a
12、nd 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 thoug
13、ht to operate database sufficiently, caring for the bottom database structure unnecessarily.Hibernate relieves the developer from 95 percent of common data persistence related programming tasks, compared to manual coding with SQL and the JDBC API4. And it can integrate various Web server or applicat
14、ion server, and nearly support all popular databases server.2.2 Principle of HibernateFigure 2. Hibernate systematic structureAs shown in figure 2, Hibernate lies in the middle layer that is between application and database .In the provided persistent service, Hibernate maps class to rows of datashe
15、et by properties and mapping files of class (mapping.xml) itself. Application interacts with database by Persitstent Object (PO) to handle data directly.3 The Integration of Struts and HibernateIn the open source frameworks, for the presentation part, Tapestry has the powerful and natural combinatio
16、n of pages, its document is too conceptional to benefit programming. And its learning curve was too steep and so on. For the logic part, Spring has a good integration function, but there is a lack of public controller. And EJB depends on the EJB containers, at the same time, it is realized complicat
17、edly. While Struts has been applied extensively because of its advantages.At present, most of systems apply the relational databases mainly, while Java is an object-oriented language essentially. In Model part of Struts framework application, using SQL and JDBC to operate databases when storing and
18、fetching objects reduces programming efficiency and the systematic maintainability. Traditional J2EE-based application applies heavyweight framework based on EJB that adapts to the large enterprise development, while development and debugging by EJB container need to consume a plenty of time and hig
19、h price. EJB3 improves the disadvantages of original EJB, but its application is not mature yet.Hibernate can substitute Container-Managed Persistence (CMP) to accomplish heavy responsibility of permanence in J2EE framework of applying EJB.In a word, Hibernate can resolve the difficulties coming fro
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 基于 SSH 架构 交流 社区 毕业设计 外文 翻译
链接地址:https://www.31doc.com/p-5182400.html