节点文献

轻量级J2EE框架的架构与应用

Construction and Application of Lightweight J2EE Framework

【作者】 申庆峰

【导师】 段富;

【作者基本信息】 太原理工大学 , 计算机应用技术, 2008, 硕士

【摘要】 在电子商务和企业级应用软件开发中,J2EE技术占有十分显著的地位。传统的基于EJB的J2EE架构的优势是它的高级J2EE特性和分布式应用,而对于那些不需要这些高级特性支持的应用系统,J2EE所必须的较为复杂的开发和配置,势必降低开发速度,增加开发成本。论文在对J2EE框架技术文献综述的基础上,分析了传统的基于EJB的J2EE框架及技术在目前的电子商务和企业开发中暴露出的缺陷,提出了一种基于多个开源框架的轻量级J2EE开发架构的解决方案,并以此架构成功开发了网上书店系统。实践结果表明,该系统具有平台无关性,可维护性,可扩展性,可移植性和组件的可复用性,进而验证了轻量级J2EE开发架构的有效性。论文主要工作如下:(1)具体分析了Struts、Spring、Hibernate在分层结构的轻量级Web应用的不同层次的作用,并整合这三种框架,设计了一种适合企业Web应用的Java通用架构。该架构将Struts中的业务逻辑交给Spring管理,相关类用Spring的beans配置完成;由Hibernate负责数据的持久化,Hibernate的事务管理交由Spring管理。(2)在对轻量级容器的核心机制分析的基础上,重点讨论了其中控制反转模式的实现策略及特点。论文采用Spring轻量级容器,为业务层组件管理提供了一种有效的工具,实现了业务层组件和容器间、组件和组件间低耦合,同时提高了应用开发的灵活性和可测试性。(3)使用所设计的架构,开发了网上书店系统。表示层基于Struts框架开发,并使用了JSTL、Validator、Tiles等组件;业务逻辑层基于Spring框架,使用了AOP、IoC组件;持久层使用Hibernate框架实现。论文通过Spring整合各层资源,使用DAO方式和数据持久层交互,以Service方式向表示层提供服务。论文采取了多种方式改善框架性能,引入了缓存组件EHCache和数据库连接池组件Proxool。通过设置缓存机制,极大改善了系统的性能。

【Abstract】 The J2EE technologies hold an extremely remarkable status in the e-business and enterprise application system developments. But many projects do not need advanced J2EE characteristics and distributed applications that are the advantages of the traditional J2EE framework, the complex development, configuration, deployment of advanced J2EE characteristics and distributed application will greatly slow down the development and increase the enterprise’s cost. On the basis of summarizing literature about J2EE technologies, the thesis analyzes these limitations when traditional J2EE framework which is based on EJB develops the e-business and enterprise system. The thesis proposes a lightweight J2EE framework scheme which is based on open source frameworks and lightweight container. On last chapters, the thesis develops the online book store system using the scheme. The result shows the system bears independency of platform, and has these characteristics of high maintainability, expansibility and reusability on components. And then the practice proves the lightweight J2EE development framework is available. Work in the thesis is shown as follows: (1)The thesis researches Struts, Spring and Hibernate frameworks, and analyzes each framework’s function in web applications which are based on hierarchical structure. The thesis constructs a common Java architecture which is suitable for enterprise web application by integrating with three frameworks. The framework hands Struts business logic to Spring, utilizes Spring’s beans configuration to manage the related classes; manages objects’ relation of between controller and data access object through Spring and implements data persistence by Hibernate. The framework takes Spring to manage transaction.(2) On the basis of analysis aiming at lightweight container’s core mechanism, the thesis focuses on the strategy and characteristic of Inversion of Control pattern. Using spring framework, the thesis provides effective tool to manage business layer components. The thesis implements the low coupling between the components of business layer and the container, also between the components and components, and meanwhile enhances the flexibility and the testability of the application development.(3) The thesis develops online book store by using the framework proposed in the thesis. The presentation layer is implemented by Struts framework, and uses these components such as JSTL、Validator Tiles. The business layer bases on Spring framework, and uses AOP and IoC components. The system uses Hibernate framework to implement persistence layer. All resources from layers are integrated by Spring. DAO layer and data persistence layer are interactive through Spring. Spring provides service to presentation layer also. The thesis upgrades system’s performance by importing cache component EHCache and Pool component Proxool. It shows the system performs better when using EHCache and Proxool.

  • 【分类号】TP311.52
  • 【被引频次】4
  • 【下载频次】171
节点文献中: 

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

本文的引文网络