Struts2框架下Web应用系统的设计与研发
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
目前,随着Internet技术的迅速发展,Web应用的范围也越来越广泛。但是,在现有的的Web应用系统中,普遍存在着可复用程度低、维护工作繁琐、应变能力薄弱等不足。随着Web应用的需求越来越复杂,开发周期越来越紧迫,同时对系统的稳定性、扩展性和可维护性的要求也越来越高,因此如何进行合理的分层设计,各层的框架如何搭建以及如何选择最合适的技术就显得尤为重要。
     针对以上问题,论文结合Web应用开发多层次体系结构发展的现状,对Struts2框架、Spring框架、Hibernate框架进行了深入的学习及研究。Struts2框架是一个实现了MVC设计模式的开源Web层框架,提供了可复用的软件架构,全面减轻了构建多层Web应用的负担。Spring是J2EE领域一个非常优秀的框架,它提供了一种轻量级IoC容器,该容器负责创建、管理应用组件,从最前端的控制器,到中间层的业务逻辑组件,以及底层的DAO组件,都处于Spring容器的管理下,以一种低耦合的方式运行。Hibernate框架是一个开源的数据持久层框架,允许程序员使用对象编程思想来操纵数据库并把全部精力集中到对象和类的编程上,从而提高了数据库访问的灵活性。
     本文重点阐述的是:利用Struts2框架、Spring框架、Hibernate框架作为分层模型的基础,改进了一种高效的开发Web应用的分层模型,并把它们具体应用到系统开发中,使得在Struts2框架下开发的Web应用系统具有良好的健壮性、可维护性、可扩展性、可复用性以及更好的用户体验。
     拍卖是购买和销售的主要交易方式之一,随着Internet技术的迅速发展,基于Internet的电子商务也得到快速发展,拍卖模式已经成为电子商务的重要组成部分,因为它充分利用了互连网的特性,开创了一个前所未有的巨大市场,因而被广泛看好。对商家而言,以拍卖的形式在网上采购、销售物品,由于不受时间和空间限制,并且可以有效降低运营成本并提高效率,因而具有极大的吸引力。同时在所用技术方面基于J2EE平台的产品几乎能够在任何操作系统和硬件配置上运行。
     因此,在上述理论研究的基础上,本次课题针对网上拍卖行为设计开发了一个基于J2EE的电子拍卖系统。在详细分析了电子拍卖系统的运作业务流程后,提出用Struts2框架、Spring框架、Hibernate框架组合一种轻量级架构框架,来实现系统的相应功能和模块结构。在开发过程中,笔者结合实际项目的开发工作,以所改进的分层模型为基础,详细介绍了该电子拍卖系统的模式、流程、以及其功能和框架结构的设计与实现,体现出了当今三大轻量级架构在开发企业级应用当中的优势。
At present, as Internet rapidly develops, web application is becoming more and more widely used. However, it is very common that programs in the existing web application systems are with the problems of low reusablity, complicated maintenance and bad adaption. As the requirements of web application is getting more and more complicated, the developing cycle is increasingly pressing and the requirements for the system s stability, ability of extension and maintainability is increasingly advanced,so,how to separate a Web application into several layers reasonably,the framework's integration of each sub-tier and selection of appropriate development technology has become more and more important.
     To solve these questions,this thesis study and research Struts2 framework,Spring framework,Hibernate framework deeply,and combining with investigations of current n-tier architecture of Web application development. As an open source web framework,Struts2 is a standard implementation of MVC design pattern.It provides a reusable software framework and makes it easy to build n-tier Web application. Spring is a very good framework in the J2EE field,it provides a lightweight IoC container which is responsible for the creation and management of application components.From the front-end controller, to business logic components in the middle layer, as well as the DAO components in the bottom layer,they are under the management of Spring container by low-coupling way. Hibernate framework is an open source data persistence layer framework,programmers can manipulate database by object programming idea and pay attention on object programming and class programming.It improves database visitation's flexibility greatly.
     This thesis's key expatiation is following:A powerful layers model to develop Web application based on Struts2 framework, Spring framework and Hibernate framework is designed,and the Web application system which is built with the layers model based on Struts2 framework has better robustness,maintainability,extensibility, reusability and better user experience.
     Auction is a main way in the purchasing and the selling transactions. With the fast development of Internet technology, the electronic commerce which based on the Internet also develops very quickly. The auction pattern has become an important part of the electronic commerce, as it makes full use of the characteristic of Internet and creates an unprecedented large market, so it has been wildly recognized. As for the merchant, purchasing and selling goods on-line in the form of auctions has great attraction to them, because in this way they can purchase and sale without considering the limitation of time and the space, further more, they can reduce the operation cost effectively and enhances efficiency. Meanwhile, in the technical aspect, almost all the products based on the J2EE platform can be operated in any operating system and the hardware disposition.
     Based on the research done above,therefore, considering the behavior of the electronic auction, this topic has developed an electronic auction system which based on the Struts2. After analyzing the operation service flow of the electronic auction system seriously, we put forward to use the Struts、Spring、Hibernate lightweight overhead construction frame to realize the system corresponding function and the modular structure. In the procedure of development,combining with the author's practical development experiences, based on the improved layers model,through fully introducing the electronic auction system pattern, the flow, the function as well as the realization of the portal frame construction, it manifests the superiority of three light-weight overhead constructions in the application of developing the enterprise's level.
引文
[1]董莉敏,侯晓霞,李志兰,J2EE架构下的企业在线购物系统,计算机工程与应用,2001年第22期
    [2]刘欢,基于J2EE的MVC设计模式的研究与实现(硕士学位论文),武汉理工大学,2006年
    [3]框架不是框框——应用框架的基本思想,软件工程专家网,2003年
    [4]Johnson, J2EE Development Frameworks, Computer Science 2005,Ⅰ(38):107-110
    [5]谢晓芹,柳西玲,让设计与分析复用—基于构件开发的应用框架设计,计算机世界报,第04期B8、B9
    [6]叶娜,J2EE Web应用开发中Struts框架的研究与扩展(硕士学位论文),西安建筑科技大学,2005
    [7]郝兴伟,Web技术导论[M],清华大学出版社,2005,6-7
    [8]刘继华,基于J2EE和MVC模式的Web应用研究(硕士学位论文),武汉理工大学,2003年
    [9]孙卫琴,精通Struts:基于MVC的Java Web设计与开发,电子工业出版社,2004年
    [10]孟斌,吴建波,冷文浩,基于Struts和Hibernate架构的Shids系统设计与实现,计算机工程与设计,2006年第27期
    [11]郝彬,陈朔鹰,利用框架技术构建Web应用,计算机工程与设计,2007年第28期
    [12]袁梅冷,黄烟波,黄家林等,J2EE应用模型中MVC软件体系结构的研究与应用,计算机应用研究,2003年第20期
    [13]戎伟,张双,精通Struts Java流行服务器、框架、工具及整合应用,人民邮电出版社,2006
    [14]Struts2中文参考手册[EB/OL], http://struts.apache.org/struts2
    [15]侯国照等,Struts2的应用研究,中国高新技术企业,2008年第17期
    [16]张毅,基于Struts框架的J2EE WEB应用研究与实现(硕士学位论文),西南交通大学,2007年
    [17]李卓,孙建伶,基于Struts框架的Web应用重构,计算机工程与设计,2006年第27期
    [18]耿伟,刘振海,孙磊,Struts2框架技术的研究与分析,电脑知识与技术,2008年11月
    [19]Paul Perrone, Venkata S. R. K. R, 《Chaqanti Building Java Enterprise Systems with J2EE)), Pap/Com edition,2000
    [20]李守振,张南平,常国锋,Web应用分层与开发框架设计研究,计算机工程,2006年第32期
    [21]李春华,高建华,使用分层模型改进MVC设计架构,计算机工程与设计,2007年第28期
    [22]宋彦儒,周翔,基于Struts2框架的Web系统安全模型分析,江西理工大学,科技风Technology Trend,2009年第1期
    [23]王卫平,王松涛,一种基于J2EE. Spring和Hibernate的轻量级EAI架构[J],计算机系统应用,2005年第11期:38-40
    [24]孙卫琴,精通Hibernate:Java对象持久化技术详解[M],电子工业出版社,2005
    [25]骆小来,电子商务,人民邮电出版社,1999年10月
    [26]沈雷,基于J2EE的电子拍卖系统,软件导刊,2006年11期
    [27]电子拍卖,MBA智库百科,http://wiki.mbalib.com/wiki
    [28]张金城,网上拍卖:电子商务的一种新的交易方式,审计与经济研究,2002年第5期
    [29]陈志成,陈道贵,基于UML的电子拍卖系统的分析与建模,科技情报考发与经济,2005年第15卷第21期
    [30]张晓梅,Struts框架在J2EE信息系统开发中的应用研究(硕士学位论文),西南交通大学,2006年
    [31]孙申申,基于Struts扩展架构的大型Web应用系统设计与实现(硕士学 位论文),东北大学,2005年
    [32]Kevin Griffith, Using Web Application Models to Build Struts-based Web Applications from CICS Programs,2003
    [33]孙鑫,Struts2深入详解,电子工业出版社,2008年6月
    [34]陈云芳,精通Struts2基于MVC的Java Web应用开发实战,人民邮电出版社,2008年7月
    [35](美)Cay S. Horstrmann, Gary Cornell著,王建华,董志敏,杨保明等译,最新Java2核心技术,机械工业出版社,2004年
    [36]蔡剑,景楠,Java网络程序设计:J2EE1.4,清华大学出版社,2003年
    [37](美)Michael Gridley著,邢国庆译,J2EE应用与BEA WebLogic Serve,电子工业出版社,2002年
    [38]黄永欣,周淑秋,用Spring搭建Web应用的轻量级解决方案,计算机技术与发展,2007年17期
    [39]Altendorf,Hohman,Zabicki,Using J2EE on a large Web-based project, Software, IEEE Volume 19, Issue2,2002
    [40]张宏森,朱征宇,四层B/S结构及解决方案,计算机应用研究,2002年第9期
    [41]Bruce Eckel著,候捷译,Thinking in Java(Java编程思想),机械工业出版社,2002年
    [42]高宇靖,基于MVC设计模式的Struts框架的探索(硕士学位论文),吉林大学,2004年
    [43]Struts2 Core 2.0.6 API[EB/OL] http://struts.apache.org/2.0.6/struts2-core/apidocs/index.html ,2006
    [44]Apache Struts2 Documentation Tag Reference[EB/OL] http://struts.apache.org/2.0.6/docs/tag-reference.html,2006年
    [45]李守振,结合Struts与Hibernate的Web开发模式之研究与应用,(硕士学位论文),武汉理工大学,2006年
    [46]刘晓华,UML基础及Vision建模,电子工业出版社,2004年
    1董莉敏,侯晓霞,李志兰,J2EE架构下的企业在线购物系统,计算机工程与应用,2001年第22期
    2刘欢,基于J2EE的MVC设计模式的研究与实现(硕士学位论文),武汉理工大学,2006年
    3框架不是框框——应用框架的基本思想,软件工程专家网,2003年
    4 Johnson, J2EE Development Frameworks, Computer Science 2005,1 (38):107-110
    5谢晓芹,柳西玲,让设计与分析重用—基于构件开发的应用框架设计,计算机世界报,第04期
    6叶娜,J2EE Web应用开发中Struts框架的研究与扩展(硕士学位论文),西安建筑科技大学,2005
    7郝兴伟,Web技术导论[M],清华大学出版社,2005,6-7
    8刘继华,基于J2EE和MVC模式的Web应用研究(硕士学位论文),武汉理工大学,2003年
    9孙卫琴,精通Struts:基于MVC的Java Web设计与开发,电子工业出版社,2004年
    10孟斌,吴建波,冷文浩,基于Struts和Hibernate架构的Shids系统设计与实现,计算机工程与设计,2006年第27期
    11郝彬,陈朔鹰,利用框架技术构建Web应用,计算机工程与设计,2007年第28期
    12袁梅冷,黄烟波,黄家林等,J2EE应用模型中MVC软件体系结构的研究与应用,计算机应用研究,2003年第20期
    13戎伟,张双,精通Struts Java流行服务器、框架、工具及整合应用,人民邮电出版社,2006
    14 Struts2中文参考手册[EB/OL],http://struts.apache.org/struts2
    15侯国照等,Struts2的应用研究,中国高新技术企业,2008年第17期
    16张毅,基于Struts框架的J2EE WEB应用研究与实现(硕士学位论文),西南交通大学,2007年
    17李卓,孙建伶,基于Struts框架的Web应用重构,计算机工程与设计,2006年第27期
    18耿伟,刘振海,孙磊,Struts2框架技术的研究与分析,电脑知识与技术,2008年11月
    20李守振,张南平,常国锋,Web应用分层与开发框架设计研究,计算机工程,2006年第32期
    21李春华,高建华,使用分层模型改进MVC设计架构,计算机工程与设计,2007年第28期
    22宋彦儒,周翔,基于Struts2框架的Web系统安全模型分析,江西理工大学,科技风Technology Trend,2009年第1期
    23王卫平,王松涛,一种基于J2EE、Spring和Hibernate的轻量级EAI架构[J],计算机系统应用,2005年第11期:38-40
    24孙卫琴,精通Hibernate:Java对象持久化技术详解[M],电子工业出版社,2005
    25骆小来,电子商务,人民邮电出版社,1999年10月
    26沈雷,基于J2EE的电子拍卖系统,软件导刊,2006年11期
    27电子拍卖,MBA智库百科,http://wiki.mbalib.com/wiki
    28张金城,网上拍卖:电子商务的一种新的交易方式,审计与经济研究,2002年第5期
    29陈志成,陈道贵,基于UML的电子拍卖系统的分析与建模,科技情报考发与经济,2005年第15卷第21期
    30张晓梅,Struts框架在J2EE信息系统开发中的应用研究(硕士学位论文),西南交通大学,2006年
    31孙申申,基于Struts扩展架构的大型Web应用系统设计与实现(硕士学位论文),东北大学,2005年

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700