摘要
J2EE模式提供了一组基于J2EE平台的对常见问题的解决方案,但是由于模式角色与模式的每一个实例类之间存在着映射关系,所以按照传统的面向对象方式使用J2EE模式,会产生一系列横切问题。通过一个实例,对面向对象实现业务代表模式所引发的问题进行了深入的分析和研究,提出了一种在J2EE应用中基于面向方面编程技术改进Business Delegate模式的实现方案。实践结果表明,使用该改进方案,能提高系统的性能,具体表现在更好的代码局部化、可维护性、可扩展性和可重用性。
The J2EE patterns are a collection of J2EE-based solutions to common problems. However, a number of J2EE patterns involve crosscutting structures in the relationship between the roles in the pattern and classes in each instance of the pattern. A concrete application is chosen to analyze the problem of crosscutting within the implementation of business delegate pattern with OOP. A method to implement business delegate pattern using aspect-oriented programming (AOP) is present, and the result shows that this method helps improving the performance of J2EE Applications, including better code locality, maintainability, extensibility, and reusability.
出处
《计算机工程与设计》
CSCD
北大核心
2008年第2期344-346,349,共4页
Computer Engineering and Design
基金
无锡市十五科技攻关项目(CI03003)
关键词
J2EE模式
面向方面的编程
业务代表模式
横切关注点
网上订购系统
J2EE patterns
aspect-oriented programming
business delegate pattern
crosscutting concerns
online ordering system