节点文献

映像和元对象协议实现AOP的研究

The Realization of AOP Using Reflection and Meta-Object Protocol

【作者】 臧海运

【导师】 冯志勇;

【作者基本信息】 天津大学 , 计算机应用, 2005, 硕士

【摘要】 关注点的分离原则是软件工程的基本原则。传统的编程技术在实现非功能性关注点的分离方面遇到了困难。为了克服这个困难,人们提出了面向方面的编程思想(AOP)。AOP的出现并不是对传统编程技术的否定,而是在其基础上的扩展。AOP的主要目标是实现非功能性关注点的局部化和方面(aspect)代码的自动“横切”,它的思想来源于对动态映像式面向对象语言和元对象协议(MOP)的研究。AOP有多种实现机制,适应性编程、组合过滤器模型以及映像和元对象协议都从不同的方面实现了AOP。本文致力于映像和元对象协议对AOP实现机制的研究。映像式元程序设计的层次化结构模型将系统分为元层和基本层,分别对非功能性关注点和核心功能关注点进行封装。这种分层的体系结构体现了关注点的分离原则,实现了非功能性关注点的局部化。此外,元对象协议定义了元层和基本层之间的通信接口,并定义了元层内部不同方面元对象的相互协作模式。元对象通过元对象协议对基对象进行透明管理的过程,实际上就是方面代码自动“横切”的过程。采用映像和元对象协议为AOP的实现定制解决方案,并将该方案应用于实际系统建模过程,是本文努力解决的问题,也是本文的创新所在。本文通过对映像式元程序设计以及MOP的分析研究,提出了基于映像的AOP解决方案,并将该方案应用于学生课程注册管理系统(CRMS)的体系架构设计过程中。在此基础上,本文还详细讲述了CRMS中关注点分离和重新组合的策略及实现过程,在面向方面编程方面进行了有效的尝试。第五章详细分析了该方案的优点和不足之处,指出课题未来的研究方向。

【Abstract】 Separation of concern is a basic principle of software engineering. Conventionalprogramming technologies are in difficulty of separating non-functional concernsfrom other ones. In order to overcome this difficulty, people put forward the thoughtof aspect-oriented programming (AOP). The thought of AOP is not conflicting withconventional programming technologies;actually it is an extension to them. The goalof AOP is to realize the localization of non-functional concerns and automaticcrosscutting of aspect code;one of its origins is the research of dynamic reflectiveobject-oriented languages and meta-object protocols (MOP).There are many mechanisms for the realization of AOP, such as adaptiveobject-oriented programming, composition filters and reflective meta-programming.This article applies itself to the study of realizing AOP using reflection and MOP. Thestructure of reflective meta-programming divides system into two levels: base leveland meta level, these levels are used to encapsulate functional concerns andnon-functional concerns individually. On the one hand, This level structure not onlyincarnates the principle of separation of concerns, but also realizes the localization ofnon-functional concerns;on the other hand, meta-object protocols defines interfacesused in the communication between base level and meta level and patterns used bymeta-objects to cooperate with each other in meta level. The process of meta-objects’transparent management on base-objects through MOP, is also the crosscuttingprocess of aspect code.Customizing a solution for AOP using reflection and MOP, and using this solutionin modeling process of the practical system, are problems this article tries hard tosolve, thus, how to solve these problems are innovations of this article. We putforward an AOP solution in this article, and put this solution into practice in thestructure design process of students’ Courses Registration and Management System(CRMS). We also tell of the policies used to separate and compose different concernsin this article, and make an effective experiment in aspect-oriented programming.

  • 【网络出版投稿人】 天津大学
  • 【网络出版年期】2006年 06期
  • 【分类号】TP311.52
  • 【下载频次】75
节点文献中: 

本文链接的文献网络图示:

本文的引文网络