基于Spring架构和Hibernate数据持久化的开发方法的研究及其应用
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着电信技术的迅速发展,网络的规模越来越庞大,而且网络的种类和需求也越来越多,并且网络都伴随着大量的数据,需要采用关系型数据库来存放数据,由于关系型数据模型和面向对象存在差异,这些都大大的加深了网络设计和规划软件的开发的难度。
     轻量级容器使用依赖注入的设计原理,可以动态地使系统主要组件之间地耦合变的松散,Spring就是一种多层的轻量级框架,是为解决企业应用程序开发复杂性而创建的。直接调用JDBC是Java发展初级阶段访问数据库的唯一手段,持久层框架封装了JDBC动作,他们以优良的设计大大提高了数据库访问层的开发效率,并且通过对数据访问中各种资源和数据的缓存调度,实现了更佳的性能。Hibernate就是这样一种开源的持久层框架,它全面减轻了数据库开发的复杂度,使系统具有更好的性能和移植性,而且它实现了对象模型到关系数据模型之间的映射。随着应用程序的生成过程变得更加复杂,确保在每次生成期间都使用精确相同的生成步骤,同时实现尽可能多的自动化,以便及时产生一致的生成版本,这就变得更加重要了,Ant是一个Java生成工具,正好弥补了这方面的缺陷,使得上面的工作更容易实现。XDoclet则在从对象模型到关系数据模型之间映射的自动实现做出了很大的贡献。
     本论文的研究重点首先是以Spring和Hibernate为基础的理论知识,然后利用Spring和Hibernate等开源框架来整合成一个整体架构,实现网络规划软件的开发。在整个开发过程中利用Spring来实现对代码类(bean)的管理,用持久层框架Hibernate来实现将持久化对象映射到数据库表并对其进行操作管理,最后并用Ant和XDoclet来实现整个系统代码的编译、打包和自动实现对象模型到关系数据模型的映射。
     开发结果表明,整个系统具有很高的可维护性、可扩展型和组件可复用性。
With the rapid development of the telecom technology, the dimensions of the telecom network is more and more huge, and the kind and demand of telecom network are more and more. And a great deal go with the network, That needs to use Relational database to keep these data. Because the difference between Relational data model and Object data model , these all increase the difficulty of the design of network software.
     Light-Weight framework is designed with dependency injection and can make main components loose coupling dynamically. Spring which is designed for solving the complexity of developing enterprise application is a multilayer light-weight framework. Invoking JDBC directly is the only way to access database in the beginning of Java development. The persistence framework which are well-designed and encapsulate JDBC acts enhance the efficiency of data access and get much better performance by cache mechanism, Hibernate is an open source persistency framework, It reduces the complexity of developing database and make system portable, and it realize the Object/Relational Mapping. With the build process of the application program became more and more difficulty, it’s more important to make sure the build step sameness in the same build process and realize the automatization and the same edition. Ant is a Java build tool, it fetch up the upper disfigurement and it can make the work become easy. XDoclet makes a great contribute in realizing the Object/Relational Mapping automatization.
     The focal point that the thesis studies is the theory knowledge based on Spring and Hibernate at first,then utilize Spring and Hibernate to integrate a whole framework to realize the development of the network toolkit.Make use of Spring to realize the control java beans in developing the course entirely,Make use of Hibernate to manage persistence object and realize the mapping from persistence object to database.In the end, uses Ant and XDoclet to realize compile,pack and O/R Mapping automatization.
     The result shows the system has characteristics of high maintainability, expansibility and reuseability.
引文
[1] Rod Johnson, Expert One-on-One J2EE Development Without EJB, Wiley, 2004.
    [2] Rod Johnson, Expert One-on-One J2EE Design and Development, Wrox Press, 2003.
    [3]陈华军:J2EE构建企业级应用解决方案,北京,人民邮电出版社,2002年3月
    [4]何铮陈志刚:对象/关系映射框架的研究与应用,计算机工程与应用,2003.26,P189
    [5]董洪杉,窦延平:利用Hibernate的J2EE数据持久层的解决方案[J].计算机工程,2004,30:17~18
    [6] Kruszelnicki, Persist data with Java Data Objects, Part 1 and 2 :JavaWorld: 2002,3
    [7] Spring-reference, http://www.springframework.org.
    [8]罗时飞,精通Spring,电子工业出版社,2005.4.1
    [9] Hibernate-reference, http://www.hibernate.org.
    [10]孙卫琴,精通Hibernate:Java对象持久化技术详解,电子工业出版社,2005.4.1
    [11] Christian Bauer, Gavin King, Hibernate In Action. http://www.manning.com.
    [12] Craig Walls, Spring In Action, Manning publishing 2006.
    [13] Matt Raible, Spring Live, SourceBeat,LLC, 2004.
    [14] Martin Fowler, Inversion of Control Containers and the Dependency Injection pattern, 2003.1.4
    [15] Rod Johnson, Spring-Java/J2EE Application Framework. ww.springframework.org.
    [16] Rod Johnsonet, Professional Java Development with the Spring Framework. Wiley Publising, 2005
    [17] Anil Hemrajani, Agile Java Development with Spring,Hibernate and Eclipse,Sams publishing,2006.9
    [18]夏昕,深入浅出Hibernate,电子工业出版社,2005.
    [19]陈天河:Hibernate项目开发宝典,北京,电子工业出版社,2006年6
    [20]朱庆伟,吴宇红:一种对象/关系映射框架的分析和应用.电子科技.2004,(1)
    [21]王卫平,王松涛,王名茗:一种基于J2EE、Spring和Hibernate的轻量级EAI构架.计算机系统应用.2005
    [22]卢军涛,基于三层实现结构的管理信息系统研究与应用,西北工业大学,2007
    [23]张宏森,四层B/S结构及解决方案,计算机应用研究,2002年第9期,p21-22
    [24]候云峰,三层次Client/Server应用开发指南,电子工业出版社,2000.3
    [25]郭涛.J2EE多层体系结构在教育信息平台中的应用[J].计算机应用研究,2004,第六期
    [26] 1356nt-ServerSide-HighLevelDesign. Alcatel-Lucent.
    [27] 1356nt-ServerSide-DetailedDesign. Alcatel-Lucent.
    [28]蔡敏,UML基础与ROSE建模教程,人民邮电出版社,2006.1
    [29]张风英,基于领域模型的面向对象分析及UML建模,计算机应用与软件,2004
    [30] Designing Enterprise Application With the Java 2 Platform, Enterprise Edition Copyright Sun Microsystems, Inc, 2000.
    [31] Partha Kuchana, Software Architecture Design Patterns in Java.CRC Press 2004
    [32] Bruce Eckel, Thinking in Patterns with java.2003.
    [33]宋汉增,沈琳:利用Hibernate对象持久化服务简化Java数据库访问[J],计算机应用,2003,23(12):135-137
    [34]懂荣辉,轻量级J2EE架构的应用,兰州理工大学,2006
    [35]罗艳,J2EE框架下持久层技术的研究整合Hibernate的EJB架构的设计与实现,电子科技大学,2006
    [36] RodJohnson、JuergenHoeller:Spring框架高级编程(蒋培译),北京,机械工业出版社,2006年4月
    [37]阮飞,陈赫贝:J2EE数据持久层技术及其比较[J].微机发展,2005,(10)
    [38]张绍成,李华林,马玉琴:基于Java的对象持久化方法研究,小型微型计算机系统,2005,26(2):264-267.
    [39] Ambler S W:Mapping Objects To Relational Databases,AmbySoft Inc,White Paper,2000.10
    [40]柏银,基于Struts+Spring+Hibernate多架构的性能分析系统,四川大学,2006
    [41] Rumbaugh J,面向对象建模与设计(影印版第二版),北京:中国电力出版,2003
    [42]车敦仁,周立柱:关系数据库与面向对象数据库的集成[J],软件学报,1996,7(11);669-675
    [43] Enterprise Java Bean Specification, Http://java.sun.com/products/ejb/docs.html
    [44] JmaesElliottO’Reilly.Hibernate:A Developer’sNotebook[M]. O’Reilly Media,Ine.May,2004
    [45]王万新.基于J2EE技术的多层分布式MIS系统的设计与实现.贵州大学工学硕士学位论文.2003-3.
    [46] Erocj Gamma, Richard Helm,Ralph Johnson,John Vlissides,李英军,马晓星等译,设计模式:可复用面向对象软件的基础,机械工业出版社,2000
    [47] Terry Halpin.信息建模与关系数据库——从概念分析到逻辑设计.电子工业出版社,2004
    [48]于惠琴:基于Hibernate的技术标准管理系统的设计与实现,吉林大学硕士学位论文,2006
    [49] Matthew Modie , Pro Apache Ant. Apress. 2005.
    [50] XDoclet, http://sourceforge.net/projects/xdoclet.

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

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

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