摘要
基于面向方面编程(AOP)实现GoF设计模式是目前程序设计方法学的一个研究热点。针对GoF设计模式中的策略模式的传统面向对象实现方法所存在的问题,设计了一种基于AOP的实现方法,并应用到J2EE"应用服务"核心模式的实例中。分析结果表明,该方法能有效解决策略模式的传统面向对象实现方法中的混乱、间接影响、封装破坏等问题。
Implementation of GoF design patterns based on AOP and finding new AOP design patterns are the research hotspots in current programming methodology.In this paper,according to the problems of traditional object-orientation implementation method of strategy pattern in GoF design pattern,an implementation method based on AOP was designed,and it has been applied to Core J2EE "application service" patterns instances.The result of analysis showed that this method can effectively solve the problems such as confusion,indirection influence and encapsulation breaching in traditional object-orientation implementation method.
出处
《计算机应用与软件》
CSCD
2010年第1期121-123,共3页
Computer Applications and Software
基金
湖北省教育厅自然科学研究项目(Q200713005)
关键词
策略模式
面向方面编程
面向对象编程
Strategy pattern Aspect-oriented programming(AOP) Object-oriented programming(OOP)