李淑飞
摘 要:在J2EE的多层架构下,出现了Struts、Spring、Hibernate等很多优秀的开源框架,但这些开源框架各有所长,本文提出的开源速成框架,以高内聚、低耦合的原则对这些开源框架进行提炼、简化和整合,Web表示层使用速成MVC框架、业务逻辑层使用速成IOC框架、数据访问层使用速成ORM框架,解决了烦琐的基于J2EE的web应用架构建设,规范及简化web应用系统的开发过程,使得架构更加简练灵活快速,并成功应用在B/S架构的多个项目中。
关键词:开源框架;速成MVC框架;速成IOC框架;速成ORM框架
中图法分类号:TP31文献标识码:aDoI: 10.3969/j.issn.1003-6970.2012.02.005
Design and Application of the J2EE-based Open Source Crash Frameworks
LI Shu-fei(DongGuan polytechnic, Guangdong, 523808)
【Abstract】Under J2EE multilayer architecture, there are many excellent open source frameworks such as: Struts, Spring and
Hibernate etc. But each of the open source frameworks has its good points, the open source frameworks we raise in this paper adopt the principle of high cohesion, cow coupling to extract, simplify and integrate those frameworks. Web presentation layer adopt crash MVC framework, business logic layer adopt IoC framework, Data access Layer adopt crash orM framework, solved the tedious web application architecture construction based on J2ee, specify and simplify the development process of the web application system. Make the architecture more terse, flexible and quick, which applied in multi-projects of the B/S architecture successfully.
【Key words】open source frameworks ; Crash MVC framework, Crash IoC framework; Crash orM framework
0 引 言
目前,在J2EE的多层架构下,已经出现很多如Struts、Spring、Hibernate等成熟的开源框架,它们分别描述了J2EE层次架构上的表示层、业务层和持久层,成功的解决了一个应用上的不同实现层次。这些开源框架大大减轻了开发人员的负担,开发人员只要将这些不同层上的框架进行适当的整合,便使开发者从繁重的编码中解放出来,从而让开发者更专注于应用本身的业务逻辑开发。但是,这些开源框架各有所长,Struts框架侧重于表示层, Spring框架侧重于业务层,Hibernate框架侧重于持久层[1,2],本文将研究如何将这些开源框架以高内聚、低耦合的原则进行提炼、简化和整合成一个速成的集成框架,使用速成MVC框架处理应用后台服务的WEB表示层部分,使用速成IOC框架来处理相关业务逻辑及事务管理,使用速成ORM框架与数据库交互,使用服务在各层之间进行数据交互,构造成一个应用系统后台的系统解决方案,使得整合简化后的框架的层次更加符合企业基础架构平台的需要,更加简练灵活快速,该开源速成框架已成功应用在多个项目中。……