节点文献

集成struts和JDO的J2EE架构研究与实现

Research and Implementation of the J2EE Architecture Integrated with Struts and JDO

【作者】 唐国胜

【导师】 郭庆平;

【作者基本信息】 武汉理工大学 , 计算机应用技术, 2005, 硕士

【摘要】 近年来,随着网络技术的迅速发展和J2EE平台的广泛采用,基于B/S的多层Web体系结构逐渐发展成熟起来。MVC设计模式分离了数据的控制和数据的表现,在实现多层Web应用系统中具有明显的优势。Struts是一个基于J2EE平台、实现了MVC设计模式的框架,它全面减轻了构建多层Web应用的负担,提供可复用的软件构架。Struts中对象持久性通常由JDBC或者EJB来实现,采用JDBC可以很容易地用SQL语句同时访问多个异构的数据库,为异构的数据库之间的互操作奠定基础。它提供了一个很好的机制,可以使应用程序代码与具体的数据库厂商和数据库位置无关。但使用JDBC有如下缺点:只有使用兼容JDBC标准的关系数据库;对数据库编程麻烦乏味,容易出错;需要熟悉SQL语言而且SQL语言在各数据库不完全兼容。而如果使用EJB,虽然EJB提供了透明的持久性、可移植性和灵活的事务管理。但它同样带来了以下局限:设计复杂性;构建周期很长;响应时间长;EJB消耗了大量系统资源。 针对上述问题,本文首先对JDO这个新的轻量级持久性规范进行了研究探讨,简单介绍了JDO技术规范的历史形成以及它的体系结构,具体分析它的各种生命状态以及在生命状态中主要的转换过程,解释了它的身份标志的含义,并陈述了持久性描述符的命名规范和它的元素,阐述了使用JDO实现对象持久性的流程和发展现状,并把它与其他常用持久性技术进行了对比,总结了利用JDO开发的优势。 随后在分析了基于Struts框架的J2EE架构中实现对象持久性局限性的基础上,从中分离出对象持久层,把JDO这个面向对象的轻量级对象持久性技术集成到该架构中,提出了一个符合多层Web体系结构特点的改进架构。 本文重点分析了此架构的实现原理和关键技术,说明了该架构所具有的特点。这个架构模型充分利用JDO的优势,使开发出的Web应用程序具有很多优点,比如它具有良好的设计思想,便于实现系统的大规模开发和管理,利于系统业务的重用和改动,节约开发成本和时间,具有良好的系统性能和可移植性等等。最后,在该架构的基础上设计开发了一个“网上药店”,并给出了实现过程,说明了该架构的可行性。

【Abstract】 In recent year, with the rapid development of network and extensive adoption of J2EE platform, multi-layer Web structure based on B/S grows up gradually. MVC design pattern separates control of data from representation of data, and therefore has the advantage of implementation of multi-layer Web applications. Struts is the application framework that implements MVC based on J2EE platform. It eases the burden of constructing multi-layer Web applications and provides reusable software architecture. In Struts, object persistence generally is implemented through JDBC and EJB. JDBC can access easily several kinds of databases synchronously by SQL language and build a base of operating each other among them. It provides a good mechanism that makes the application is independent of vendors and location of the database. But JDBC has also many deficiencies. For example, we can only use a compatible database with it, programming of database is complex and dull and easily makes mistakes, we need master SQL language but SQL language of each kind of database is incompletely compatible. On the other hand, although EJB supports transparent persistence, make application transplantable and provides flexible transaction management, it makes program more complex, wastes more time to be built and response, it also needs vast system recourses.As is stated above, firstly this thesis did research in JDO that is a new lightweight persistence criterion. It introduced the formative history of JDO and its architecture, analyzed its kinds of lifecycle states and main lifecycle transitions, explained what is JDO identity, represented how to name the persistence descriptor and its elements, expound the process of implementing object persistence through JDO and current status of JDO. This thesis also compared JDO to other persistence technology and summarized its advantage.Then the thesis analyzed the localization in implementing object persistence of the J2EE architecture based on Struts and divided the object persistence tier from it. And then integrated JDO, a lightweight object oriented persistence technology, into the architecture and built a better architecture which meet the characteristic of N-tiesweb architecture.This thesis emphatically analyzed the theory and key technology of the architecture and introduced its characteristic. The architecture took the advantage of JDO well and made developed application with it hold much benefit. For example, it has good design theory and is easy to implement the development and management of a large-scale application system, make the system business reusable and revisable, save cost and time, hold better system performance and transplantable characteristic, and so on. Finally, a typical Web application-online drugstore-is designed and implemented using this architecture.

【关键词】 JDO对象持久性J2EEStruts软件架构
【Key words】 JDOObject PersistenceJ2EEStrutsSoftware Architecture
  • 【分类号】TP311.52
  • 【下载频次】170
节点文献中: 

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

本文的引文网络