基于MVC的Struts框架的应用研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
Struts框架经过八年多的发展,版本已经从Struts1.x发展到今天的Struts2.x,即所谓的从Struts1到Struts2。从过去的岁月来看,Struts是所有MVC框架中不容辩驳的胜利者,不管是市场占有率,还是所拥有的开发人群,Struts都拥有其他MVC框架不可比拟的优势。
     本文从设计模式和框架的基本概念入手,通过研究Struts框架控制器的源码,提取出其中实现的前端控制器模式、应用控制器模式、命令模式、服务工作者模式、单例模式和装饰器模式。
     接着从Struts框架的概念出发,研究了Struts2.0以前的版本是如何实现MVC架构模式的,接着研究了它的工作流程,详细分析了Struts2的两个前身:Struts1和WebWork,WebWork的数据流程,以及这两个框架的架构和主要特征,然后深入研究了Struts2框架的体系,包括Struts2框架的架构、标签库、控制器组件等,并对Struts2的拦截器技术的实现作了重点研究,对它的功能作了深入的分析,并对Struts1和Struts2的应用方面的差异进行了比较与分析。
     然后以湖北京珠高速公路管理系统的总体架构为背景,对Struts的模型层的实现进行扩展,且引入了持久化数据,及Hibernate框架,最终,应用Struts作为表示层实现,应用Hibernate作为持久层实现,并结合最新的Spring技术作为业务层实现,进行整合,利用Spring的特性去整合Struts和Hibernate这两大框架,最大程度上降低了它们的耦合性,从而设计出了一套足够灵活、松散耦合、可扩展且高效的Web开发框架。
     本文重点研究了以下几个问题:
     (1)详细分析了Struts框架的设计模式,以及Struts、Hibernate等框架的技术特点和实现方法。
     (2)深入探讨Struts2.0以后的版本对Struts1.x的巨大改进,并详细分析了Struts2.0的技术特点,对Struts2.0的核心基石拦截器件做深入研究。
     (3)以湖北京珠高速公路管理系统的总体架构为背景,整合Struts、Spring和Hibernate框架的Web实现,降低了各层之间的耦合性。
Struts frame has been developing for eight years,and the edition has reached Struts2.x from ever Struts1.x, called from Struts1 to Struts2.During the past years, Struts was deedly winner without any elenchus in all of the MVC frames. In not only appropriation proportion but also exploitation regimental, Struts has the absolute superiority relativing to other frames of MVC.
     Firstly ,it introduces the concept of pattern and framework, by studing the source code of Struts framework controller, it drawes the Front Controller, Application Controller, Service to Worker,Command, Singleton and Decorator.
     Secondly it introduces the concept of Struts frames, and researches how to realize the frame patter of MVC,then researches the work flow with detail analyse of two preexistences of Struts2, and the interception technical is the most important, detailes analysis of the differences between the Struts1 and WebWork.and Analysis it's main character of them. Besides it analyzes the structure of the Struts2 frame , including the frame of Struts2storeroom of label,module of controller and so on, also it compares some interfix between Struts1 and Struts2.
     Thirdly, at the background of Hubei Province to the Beijing-Zhuhai expressway management system for the general framework to enlarge the realization of Struts model layer, importing long haul data and Hibernate frame.
     Finally It applies the Sturts to the present action layer,applies the Hibernate to the persistence layer, applies the Spring to the business layer,conforms in framework and constructs alfexible, loosely coupled,extensible and high efficiently performance developing architecture.
     This paper focuses on the following issues:
     (1) Analysis of the classic Struts architecture, hierarchical design, Struts, Hibernate, and other framework of the technical characteristics and methods.
     (2) Thorough the tremendous improved of the Struts2 compared the Struts1, and particular analyzed the character of technic.
     (3) At the background of Hubei Province to the Beijing-Zhuhai expressway management system for the general framework to syncretize the Struts, Spring and Hibernate framework of the Web application.
引文
[1]F.Ruschran.面向模式的软件体系结构.鲍志云北京:机械工业出版社,2003:55-82科技报,2007,09
    [2]杨芙清,梅宏,李克勤.软件复用与软件构件技术.电子学报,2006,(2):37-41
    [3]阎宏.Java与模式.北京:电子工业出版社,2002.251-254
    [4].Deepak Alur,John Crupi,Dan Malks.Core J2EE Patterns:Best Practices and DesignStrategies.Pearson Education,Ine,2006.16 54
    [5]胡文华,李建民,胡振鹏.模式与设计模式—计算机与现代化,2005,(12):76-79
    [6]TMForum eTOM Business Process Framework version3.0.TMForum,2004
    [7]王力生,沈唆.Struts框架应用中Web服务扩展模型的研究.微型机与应用,2006,(10):41-47
    [8]耿钢,陈平一种基于XML的Web应用框架的设计.计算机工程与应用,2004,16(3):124-128
    [9]陈宁,陈金柱.基于三层体系结构管理信息系统的JSP技术.海军航空工程学院学报,2006年7月
    [10]于洋运用Struts的MVC设计模型.计算机应用,2003,23(12):346-347
    [11]卜亚军,于万明.基于设计模式的重构技术,计算机应用研究,2003,(12):42-47
    [12]丁鹏,刘方,邵志峰等.STRUTS技术揭密及Web开发实例.北京:清华大学出版社,2004.1-168
    [13]邓辉.基于Struts框架的J2EE Web应用的研究和实现:[硕士学位论文].武汉:武汉大学图书馆,2003
    [14]杨丽娜,熊前兴.Struts架构在Web程序中的应用研究.交通与计算机,2004,22(5):93-96
    [15]寇毅,吴力文.基于MVC设计模式的Struts框架的应用方法.计算机应用,2005,23(11):91-93
    [16]思科技产品研发中心编著.JSP应用开发详解北京.2004-01第一版
    [17]窦亮,黄国兴.基于Struts框架的Web应用开发.微型电脑应用,2004,20(7):19-21
    [18]何成万.MVC模型2及软件框架Struts的研究.计算机工程,2002,28(6):274-276
    [19]张文建,王健,范孝良.Struts在J2EEWeb层中的应用.微型机与应用,2006,8:16-19
    [20]戴翔宇.基于MVC模式的Struts框架的研究与应用:[硕士学位论文].武汉理工大学图书馆,2005
    [21]Struts2权威指南—基于WebWork核心的MVC开发.李刚:电子工业出版社,200709
    [22]尹汉东,任邵东,周生炳.基于J2EE的Web应用的MVC架构实现.计算机仿真,2004,21(11):133-136
    [23]苏晓玲.基于J2EE平台标准的Web应用开发:[硕士学位论文].福建:福州大学图书馆,2004
    [24]伊晓强.J2EE全实例教程.北京:北京希望电子出版社,2005.23-132
    [25]冯燕奎.赵德奎.JSP实用案例教程.北京:清华大学出版社,2005.18-78
    [26]李振峰.采用开源软件实现Web应用架构的研究:[硕士学位论文].北京:北京邮电大学图书馆,2006
    [27]刘晓华,陈亚强.J2EE应用开发详解.北京:电子工业出版社,2004.51-89
    [28]夏昕,曹晓刚,唐勇.深入浅出Hibernate.北京:机械工业出版社,2005
    [29]孙卫琴.精通Struts:基于MVC的JavaWeb设计与开发.北京:电子工业出版社,2004,59-60125-127
    [30]TMForum.Telecommunications Management Network(TMN)Tutorial.TMForum,Thursday,February 01,2005.56-60
    [31]夏昕,曹晓钢,唐勇编著.深入浅出Hibernate.电子工业出版社,2005-6-1
    [32]Inderjeet Singh,Beth Stearns,Mark Johnson.Designing Enterprise Applicationwith the J2EE Plafform[J].Addison Wesley Professional,2002,(2)
    [33]James Goodwill.Mastering Jakarta Struts.Wiley Publishing,Inc.,2006.8 66
    [34]夏昕.Spring开发指南.2004-9
    [35]Rod,M.Joadon.J2EEDevelopmentFrameworks.IEEEComputerSociety,2005,38(107-110)
    [36]JavaNamingandDirectoryInterfaceApplicationProgrammingInterface(JNDIAPI),SunMicrosys temsInc.htp://wwwjavasotf.com,1999-07-14
    [37]张宏展,赵辉.Web应用集成框架研究.计算机应用研究.2001,18(2):38-40
    [38]Hibenrate中文参考手册.htp://www.hibematc.org.cn/9.htmi
    [39]Robbin结合Struts和hibenrate谈J2EE架构的数据表示.htp://www.hibemate.org.cn/61.htm
    [40]杨立春.基于Struts+Spring+Hibernate框架的应用与研究.福建电脑,2007,06
    [41]Justin Couch等著.马琳、杨旭、郑等译.J2EE宝典.电子工业出版社.2002年10
    [42]孙卫琴.精通Hibemate:Java对象持久化技术详解.2005-04-01
    [43]Sun Microsystems,JAVA 2 platform enterprise editions(s),Specificationv1.3.2.9.2001
    [44]林信良.Spring2.0技术手册.电子工业出版社,2007-4
    [45]杨光译.Ajax与Java高级程序设计.人民邮电出版社,2007-5
    [46]Hibernate Reference Documentation[J/OL].Http://www.hi.hernate.org/download/hibernate reference.pdf,2007.
    [47]Christian Bauer,Gavin Hibernate In Action[M].New York:Wiley Computer,Publishing 2004.
    [48]HermeS.Struts-hibernate-integration-tutorial www.laliluna.de.2005-12
    [49]HenneS.Struts-hibernate-integration-tutofial www.laliluna.de.2005-12.
    [50]Christian Bauer.Hibernate&Tomcat Quickstart,http://www.hibernate.org.2006-01.
    [51]Design Patterns for Building Flexible and Maintainable J2EE Applications.http://ljava.sun.com/devdoper/tochnicalArticles/J2EEdespatl.
    [52]Dccpak Alar,John Crupi,Dan Malks等著,邱仲潘等译.实用J2EE设计模式编程指南.北京:电子工业出版社,2003(1).
    [53]祝文军.基于Struts框架和Hibernate技术的Web应用的设计与实现[D].大连理工大学硕士学位论文,2006.
    [54]陆荣幸,郁洲,阮永良,王志强.J2EE平台上MVC设计模式的研究与实现.计算机应用研究,2003(3)
    [55]Frank Buschmann,Regine Meunier(德),Hans Rohnert,Peter Sommerlad,Michael Stal著责可荣,郭富亮,赵皑等译.面向模式的软件体系结构卷一:模式系统.北京:机械工业出版社,2003(1)
    [56]Malcolm Davis.Struts,an open-source MVC implementation http://www-900.ibm.com/developerWorks/en/java/struts/index eng.shtml
    [57]Joseph J.Bambara,Paul R.Allen著,刘塑等译.J2EE技术内幕.北京:机械工业出版社,2002(6)
    [58]XML Schema 1.1 Part 1:Structures.W3C Working Draft 30 March 2006http://www.w3.org/TR/xmlschemall-1/
    [59]王君.基于Struts+Spring+Hibernate的企业级WEB应用框架的研究.合肥工业大学,2007
    [60]王磊.基于Struts+Spring+Hibernate的架构设计及其在电子商务中的应用.电子科技大学,2007

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

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

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