节点文献

基于Struts+Spring+Hibernate的架构设计及其在电子商务中的应用

【作者】 王磊

【导师】 孙世新;

【作者基本信息】 电子科技大学 , 计算机软件与理论, 2007, 硕士

【摘要】 近年来,随着Internet技术和企业信息化建设的发展,构建基于Web的应用系统的需求越来越复杂,开发周期越来越紧迫。对于复杂多变的市场环境,开发伸缩性强、扩展性好、重用性高和易维护、易管理的Web应用是当前Web技术发展的热点之一。针对以上问题,论文结合应用系统多层次体系结构发展的现状,对Struts、Spring和Hibernate框架进行深入分析。Struts是一个MVC模式的框架,它将业务代码与视图代码分离,有效地优化了系统结构,提高了系统的扩展性,降低系统复杂度与维护难度。Hibernate是一个对象/关系数据库映射工具,通过Hibernate的使用,能够很好地解决面向对象编程语言与关系数据库一起使用可能带来的种种麻烦,使得程序设计人员可以减少对关系数据模型的依赖,致力于业务逻辑的开发。Spring框架的使用将J2EE层次结构中的业务层分离为业务逻辑层和数据持久层,这样业务逻辑便交给Spring处理,而数据访问则交给Hibernate处理,使得层次结构更加清晰,便于系统的维护和扩展。本文以基于J2EE体系的Web开发方法为探讨的基线。首先,从Servlet/JSP的技术原理,到结合这两种技术进行Web开发的Model l和Model 2设计,再到实现Model 2的更佳方案―Struts框架内部机制的探讨等;接着,根据Web应用的经典分层理论,对持久层的设计进行了分析,引入了Hibernate框架技术;然后,应用Struts作为表示层实现,应用Hibernate作为持久层实现,并结合Spring技术作为业务层实现,进行框架整合,从而设计出了一套足够灵活、松散耦合、可扩展且高效的Web开发框架;最后,详细论述了该架构在Rox Network电子商务系统中的应用。通过实践表明,应用这种系统框架可以提高系统开发的效率,同时满足系统扩展性和可维护性的要求。

【Abstract】 In recent years, there has been greater demands for application Systems based on Web to meet more complicated requirements, shorter R&D time. So the application of Web which has better development, maintainability, expansibility, repeatability and easy management, is the hotspot of the Web technology.After framework web-based investigations of current n-tier systems as well as the Struts, Spring and Hibernate framework, a new n-tier framework to build systems is brought up in this paper based on the MVC pattern theory. Struts is a framework based on MVC model, which separates the business code and the view code, optimizes the system structure effectively, enhances expansibility of complexity system, and reduces complexity and maintainability of the system. Hibernate is an object-relational mapping tool, via using Hibernate, can resolve the problems produced by using object oriented language and relational database. Spring separates the business tier into business logic tier and data persistence tier in J2EE hiberarchy, then the business logic is handled by Spring, and the data access is handled by Hibernate, which make the hiberarchy clear, in favor of maintainability and expansibility of the system.The paper is based on the web development methods of J2EE architecture. Firstly, introduce the technical principle of Servlet/JSP, the Model l and Model 2 design combining Servlet with JSP and the discuss of internal mechanism of Struts architecture which can better implement the Model 2 and so on. Secondly, I applied the Struts to the presentation layer, applied the Hibernate to the persistence layer, applied the Spring to the business layer, conformed in framework and constructed a flexible, loosely coupled, extensible and high performance developing architecture. Finally, an example based on Rox Network E-Commerce System is introduced to illustrate the process to build an multi-tiers system with the help of the architecture. Results show that this new framework helps to increase work efficiency in exploration. Meanwhile, expansibility and maintainability of the system within this framework are also satisfactory.

【关键词】 StrutsSpringHibernate架构电子商务
【Key words】 StrutsSpringHibernatearchitectureE-Commerce
  • 【分类号】TP311.52
  • 【被引频次】52
  • 【下载频次】1169
节点文献中: 

本文链接的文献网络图示:

本文的引文网络