摘要
为了准确理解和选择面向对象程序设计中的对象功能扩充方法,提出一个对象功能扩充机制的比较模型。该模型包括动态性、依赖性、类型无关性、层次性和语言要求等几个指标,分别描述了对象功能扩充方法的灵活程度、非功能对象的内聚度、功能对象和非功能对象的耦合程度、对象功能扩充的影响范围等。基于这些指标分析了几种典型的对象功能扩充方法,给出了这些方法的比较结果。比较结果表明,面向方面的程序设计是对象功能扩充的一种有效手段,比较结果对于对象功能扩充方法的选择具有指导意义。
To accurately understand and choose the method of function expansion of objects in object-oriented programming,a model for comparing different methods for extending objects’ functionality is proposed.The model consists of some dimensions,such as dynamic,dependence,type independence,level,language requirements and so on,which are used to describe the flexibility of function expansion method,degree of cohesion of non-functional objects,the coupling of functional objects and non-functional objects,scope of influence of the non-functional objects and so on,respectively.Firstly,several typical methods of function expansion of objects are analyzed based on the model.Then,the comparison results are given.The results show that aspect-oriented programming is an effective approach for extending objects’ functionality.The results contribute to the choice of function expansion method effectively.
出处
《计算机工程与设计》
CSCD
北大核心
2010年第12期2762-2764,2818,共4页
Computer Engineering and Design
基金
国家自然科学基金项目(60873024)
湖北省自然科学基金项目(2009CDB293)
湖北省教育厅科学技术研究重点项目(D20081505)
关键词
面向对象程序设计
面向方面程序设计
对象
类
功能扩充
object-oriented programming
aspect-oriented programming
object
class
functionality extension