摘要
面向对象程序设计(OOP)的出现极大地提高了软件的可读性、可维护性和可复用性,但OOP并没有彻底解决软件的维护和复用问题,本质上是因为OOP难以模块化处理软件系统的横切关注点,以至于业务逻辑代码和其它代码(如日志记录、安全验证等)相互“纠缠”在一起,使得程序难以维护和复用。面向方面的程序设计(AOP)由此诞生,它最主要的设计原则是模块化系统的横切关注点,将业务代码与其它代码解耦,在更高的抽象和分解层次上,进一步提高了软件的可维护性、可复用性和可扩展性。首先深度探索了AOP的起源,然后阐述了AOP的本质,接着介绍了AOP的基本概念并以最为流行的实现语言AspectJ为例,剖析了AOP的实现机制,最后讨论了AOP在软件开发、测试、分析、度量和重构等领域的研究状况。
The appearance of Object - Oriented Programming (OOP) improves readability,maintainability and reusability of software, but it hasn't completely resolved the problem of maintaining and reusing software,essentially this is due to the lack of modularizing crosscutting concerns, resulting functional code and other code (such as log recording and security validation etc. ) often tangle together, leading to the poor maintenance and reuse of software. For overcoming this problem in software design and implementation, Aspect - Oriented Programming (AOP) is put forward to modularize the crosscutting concerns by a special unit, it decouples function code and other code, and on a higher-level of abstraction and decomposition, it improves maintainability, reusability and extendibility of software further. In this paper, we first explore the origin of AOP, and then we explain the essence of AOP, and next we introduce related concepts and then analyze the implementation mechanism of AspectJ, and at last we discuss aspect- oriented research areas including AOSD, aspect- oriented software testing, analysis, measurement, refactoring.
出处
《计算机与数字工程》
2005年第8期1-10,共10页
Computer & Digital Engineering
基金
国家杰出青年科学基金项目(60425206)
国家自然科学基金重大研究计划(90412003)
国家自然科学基金青年科学基金(60403016)
国家"九七三"重点基础研究发展规划(2002CB312000)
高等学校博士学科点专项科研基金(20020286004)
江苏省计算机信息处理技术重点实验室(苏州大学)开放基金(KJS02009
T8118011)等的资助。