计算机应用 ›› 2005, Vol. 25 ›› Issue (05): 1061-1063.DOI: 10.3724/SP.J.1087.2005.1061

• 软件技术 • 上一篇    下一篇

应用AOP技术实现Role Object模式

李伟斋1,2,应时1,2,叶钰1,2   

  1. 1.武汉大学软件工程国家重点实验室; 2.武汉大学计算机学院
  • 发布日期:2005-05-25 出版日期:2005-05-01
  • 基金资助:

     湖北省青年杰出人才基金资助项目(2003ABB004);;武汉市科技攻关计划项目;;武汉大学科技创新基金资助项目

Implementation of Role object pattern with AOP

LI Wei-zhai1,2,YING Shi1,2,YE Yu1,2   

  1. 1. State Key Laboratory of Software Engineering, Wuhan University, Wuhan Hubei 430072, China; 2. College of Computer Science, Wuhan University, Wuhan Hubei 430072, China
  • Online:2005-05-25 Published:2005-05-01

摘要: RoleObject模式是用于实现角色模型的最通用的设计模式。但面向对象的RoleObject模式实现方案中,存在着混合与散乱、复杂对象同一性及向下转型或接口膨胀等一些固有缺陷。基于AOP技术,提出了一种称为“混合方法”的实现RoleObject模式的方案,并通过与面向对象实现方案的比较,得出了AOP技术实现方案具有模块松散耦合、可重用性高等优点的结论。

关键词: AOP, RoleObject, 设计模式

Abstract: Role Object Pattern is the most common design pattern used to implement Role Model. However, there are some inherent flaws in the implementation of Role Object pattern with OOP, such as tangle and scatter, complex object identity and interface bloat or downcasting. A hybrid method to implement Role Object pattern based on AOP technology was presented. Compared with the object-oriented method, the advantages of AOP were addressed.

Key words: AOP, role object, design pattern

中图分类号: