首页 | 本学科首页   官方微博 | 高级检索  
     

基于AOP技术的Composite模式的改进
引用本文:李光俊,华庆一,吴海松.基于AOP技术的Composite模式的改进[J].计算机工程,2008,34(10):73-74.
作者姓名:李光俊  华庆一  吴海松
作者单位:西北大学信息科学与技术学院,西安,710127;西北大学信息科学与技术学院,西安,710127;中科院计算机科学国家重点实验室,北京,100080
基金项目:国家高技术研究发展计划(863计划) , 中国科学院计算机科学国家重点实验室开放课题基金
摘    要:Composite模式是解决部分与整体关系时常用的设计模式,但基于面向对象设计(OOP)所实现的Composite模式中存在的问题很难利用OOP解决。该文应用面向方面编程(AOP)改变类的行为,利用AspectJ实现Composite模式,通过与以OOP技术实现的Composite模式比较,得出应用AOP方法能够较好地实现责任分离,具有较高的可扩展性,模块结构更清晰。

关 键 词:面向方面编程技术  设计模式  Composite模式
文章编号:1000-3428(2008)10-0073-03
修稿时间: 

Improvement of Composite Pattern Based on AOP
LI Guang-jun,HUA Qing-yi,WU Hai-song.Improvement of Composite Pattern Based on AOP[J].Computer Engineering,2008,34(10):73-74.
Authors:LI Guang-jun  HUA Qing-yi  WU Hai-song
Affiliation:(1. College of Information Science and Technology, Northwest University, Xi’an 710127; 2. State Key Laboratory of Computer Science, Chinese Academy of Sciences, Beijing 100080)
Abstract:Composite pattern is a common design pattern to solve the relationship between part and whole. But it’s not easy to solve the problems in Composite pattern with OOP, such as responsibility tangling, intertwining code, bad reusability. This paper presents the implementation of Composite pattern with AspectJ by changing classes’ behaviors with AOP technology. Compared with Composite pattern with OOP, it proves that the pattern with AOP and AspectJ has better model responsibility cohesion and extensibility.
Keywords:AOP technology  design pattern  Composite pattern
本文献已被 维普 万方数据 等数据库收录!
点击此处可从《计算机工程》浏览原始摘要信息
点击此处可从《计算机工程》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号