摘要
工厂方法模式是面向对象软件开发中十分常见的设计模式之一,但其也存在着可扩展性和重复维护的问题。面向方面思想及技术的发展为解决上述问题提供了技术基础。应用AspectJ实现了基于面向方面技术的工厂模式,较之面向对象编程实现的工厂方法模式,本实现具有良好的可扩展性和可维护性。并通过分析认为本实现完全可以完成抽象工厂模式的任务,实现了两种工厂模式的统一。
Although the factory method model is one of the very common design patterns in the development of object- oriented software, it has such problems as bad extensibility and redundant maintenance. Through the application of AspectJ ,achieved the factory model based on aspect - oriented technologies , and eliminated the defect existing in object-oriented factory method model. Through analysis, it can be confirmed that the model not only can entirely complete the tasks of abstract factory pattern,but also can achieve the reunification of the two factory models.
出处
《计算机技术与发展》
2008年第8期47-49,共3页
Computer Technology and Development
基金
国家863计划资助项目(2004AA115090)
关键词
面向方面编程
工厂方法模式
织入
aspect - oriented programming
factory method pattern
weaver