基于AOP技术的Composite模式的改进  被引量:5

Improvement of Composite Pattern Based on AOP

在线阅读下载全文

作  者:李光俊[1] 华庆一[1] 吴海松[1] 

机构地区:[1]西北大学信息科学与技术学院,西安710127

出  处:《计算机工程》2008年第10期73-74,77,共3页Computer Engineering

基  金:国家“863”计划基金资助项目(2006AA01Z328);中国科学院计算机科学国家重点实验室开放课题基金资助项目(SYSKF0704)

摘  要:Composite模式是解决部分与整体关系时常用的设计模式,但基于面向对象设计(OOP)所实现的Composite模式中存在的问题很难利用OOP解决。该文应用面向方面编程(AOP)改变类的行为,利用AspectJ实现Composite模式,通过与以OOP技术实现的Composite模式比较,得出应用AOP方法能够较好地实现责任分离,具有较高的可扩展性,模块结构更清晰。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.

关 键 词:面向方面编程技术 设计模式 COMPOSITE模式 

分 类 号:N945[自然科学总论—系统科学]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象