首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
AOP技术在面向用户的软件组件测试中的应用   总被引:1,自引:0,他引:1  
面向方面编程AOP(Aspect-Oriented Programming)是一种支持横切关注点的分解技术,表达了更高的抽象层次,能够提供明确的截获横切结构的语言机制.讨论AOP技术在面向用户的软件组件测试技术中的应用,分析了如何使用AOP提高组件测试的可维护性和可复用性.  相似文献   

2.
面向方面技术在仓储系统中的应用   总被引:1,自引:0,他引:1  
面向方面开发(AOP:Aspect—Oriented Programming)是一项允许设计人员模块化横切关注点的新的编程技术,它引入了“方面”这一概念,“方面”把影响多个模块的行为封装到一个单独的可重用模块中。本文介绍了AOP的基本概念并举例说明了AOP在仓储管理系统中的应用。  相似文献   

3.
面向方面编程技术研究   总被引:6,自引:3,他引:3  
面向方面编程是一项允许编程人员模块化横切关注点的新的编程技术,它引入了“方面”这一概念,“方面”把影响多个模块的行为封装到一个单独的可重用模块中,利用Xerox PARC发行的AspeetJ,Java开发者可以很方便地进行面向方面编程。本文介绍了AOP、AspeetJ的基本概念并举例说明了AOP在仓储管理系统中的应用。  相似文献   

4.
Laddad  R. 《Software, IEEE》2003,20(6):90-91
Software engineers are always looking for ways to improve modularity in software. Doing so makes software easier to develop and maintain and improves its overall quality. Recently, aspect-oriented programming emerged as a new modularity technique that aims to cleanly separate the implementation of crosscutting concerns (requirements and design elements that affect multiple modules). AOP is an evolutionary step that improves the implementation's comprehensibility and simplifies incorporating new requirements as well as changes to existing ones. This systematic approach promises direct mapping of requirements and design intentions to the implementation. Such a mapping lets you trace the reasoning behind a piece of code's existence. Efficiently implementing crosscutting concerns also has an important indirect benefit: it frees resources to concentrate on the quality of the core implementation. All these factors work together to improve software quality.  相似文献   

5.
关于AOP实现机制和应用的研究   总被引:20,自引:2,他引:20  
AOP(Aspect-Oriented Programming)是一种支持横切关注的分解的技术,表达更高的抽象层次。它对于横切关注点就像面向对象程序设计对于对象封装和继承一样,提供了能够明确捕获横切结构的语言机制。一个模块化良好的横切关注点叫一个侧面(aspect)。首先介绍了AOP的基本思想,然后针对侧面代码和功能代码的编织问题讨论了几种典型的AOP实现机制的特点,优势及缺陷,最后展望了AOP的应用和发展方向,为进一步研究提供参考。  相似文献   

6.
作为目前最为主流的软件开发技术,面向对象的编程OOP(Object-Oriented Programming)对于软件产品线可变性的实现提供了一定的支持.但OOP对于具有横切特性的产品线特征以及可选的特征交互关系仍然难以提供灵活、有效的支持,因此一些相关研究者将面向方面的编程AOP(Aspect-Oriented Programming)引入到产品线实现方法中.AOP不仅能分离横切的关注点,而且还通过依赖关系分离的方式为可选交互关系的灵活配置提供了有力的支持.显然,结合OOP和AOP这两种技术实现的产品线系统将具有更高的可复用性、灵活性和可配置性.在相关问题分析的基础上对基于OOP和AOP的产品线实现技术进行了研究,并通过一个酬金发放系统产品线的实例分析对相关方法进行了验证和分析.  相似文献   

7.
基于AOP的面向对象程序的单元测试   总被引:1,自引:0,他引:1       下载免费PDF全文
张艳  赵建军  冯斌 《计算机工程》2007,33(22):76-79
单元测试被视为横切关注点,在软件测试过程中很重要。而面向方面编程(AOP)的主要目标就是分离横切关注点,因此,单元测试非常适合用AOP来解决。该文提出了在对面向对象程序进行单元测试时遇到的问题,并用AOP方法加以解决,同时比较了传统方法和AOP方法进行单元测试的优缺点。  相似文献   

8.
面向方面编程技术很好地实现和改进了软件系统横切关注的模块化,是软件发展的一个新的方向.因此,对面向方面的有效测试也就显得非常重要和很有意义,但现在国内外对面向方面测试领域的研究还比较少,对方面之间交互的测试的研究还没有.基于面向方面的语言特性和方面交互的错误模型进行分析研究,开发出相应的框架Aspat,并利用Aspat生成辅助类设计测试用例,识别方面交互中出现的错误.  相似文献   

9.
基于领域特征的AOP编织实现方法   总被引:1,自引:0,他引:1  
李淼  白勇  张波 《计算机科学》2009,36(2):299-302
面向方面编程(AOP)通过横切关注点和编织技术来实现软件.基于领域特征的领域分析、设计过程获得领域的特征和特征关系,并在领域实现的前期实现特征的代码编制.采用面向方面编程技术,对领域特征中任务(Role)的关系分析、归类后,按面向方面编程技术提供的关注点(Concerns)、通知(Advice)、横切(Crosscutting)、编织(Wea-ving)等方法,针对领域特征中的Role进行编织,组成完整的可变化特征,以适应不同软件产品的需要.采用面向方面编程技术不会对已封装的Role产生耦合,增强了代码的易用性和可维护性.  相似文献   

10.
面向方面软件开发研究   总被引:4,自引:0,他引:4  
系统的某些关注点横切整个系统,无法很好地封装在单个模块里,造成代码混乱和弥散,用面向方面编程AOP可以解决这些问题。首先介绍了现代软件开发方法及其产生的问题;其次,阐述了AOP的基本概念,并结合AspectC++演示了如何进行面向方面的编程;再次,描述了如何对UML扩展以支持对方面建模;然后介绍了面向方面软件开发在实时系统中的应用;最后给出了结论和未来的主要工作。  相似文献   

11.
软件系统的运行环境日益复杂,这样的复杂性已经远远超过了人的控制能力。面向对象的程序设计方法会造成关注点不能分离,代码纠缠在一起,使得软件的模块性与复用性大大降低。面向方面的程序设计(Aspect-oftented programming,AOP)可以很好地分离关注点使软件更好地模块化。使用反射机制(Reflection),可以使程序在运行时通过自省(introspection)了解自己的状态,自己调节(intercession)自己(运行时自动修改程序),即动态地获得新的行为的能力。我们结合使用这两种方法的优点,使用AspectJ和Java的反射机制使得软件在运行时可以根据运行情况动态地改变行为。  相似文献   

12.
Aspect-oriented programming (AOP) provides mechanisms for the separation of crosscutting concerns - functionalities scattered through the system and tangled with the base code. Existing systems are a natural testbed for the AOP approach since they often contain several crosscutting concerns which could not be modularized using traditional programming constructs. This paper presents an automated approach to the problem of migrating systems developed according to the object-oriented programming (OOP) paradigm into aspect-oriented programming (AOP). A simple set of six refactorings has been defined to transform OOP to AOP and has been implemented in the AOP-migrator tool, an Eclipse plug-in. A set of enabling transformations from OOP to OOP complement the initial set of refactorings. The paper presents the results of four case studies, which use the approach to migrate selected crosscutting concerns from medium-sized Java programs (in the range of 10K to 40K lines of code) into equivalent programs in AspectJ. The case study results show the feasibility of the migration and indicate the importance of the enabling transformations as a preprocessing step  相似文献   

13.
14.
Design patterns often need to be blended (or composed) when they are instantiated in a software system. The composition of design patterns consists of assigning multiple pattern elements into overlapping sets of classes in a software system. Whenever the modularity of each design pattern is not preserved in the source code, their implementation becomes tangled with each other and with the classes’ core responsibilities. As a consequence, the change or removal of each design pattern will be costly or prohibitive as the software system evolves. In fact, composing design patterns is much harder than instantiating them in an isolated manner. Previous studies have found design pattern implementations are naturally crosscutting in object-oriented systems, thereby making it difficult to modularly compose them. Therefore, aspect-oriented programming (AOP) has been pointed out as a natural alternative for modularizing and blending design patterns. However, there is little empirical knowledge on how AOP models influence the composability of widely used design patterns. This paper investigates the influence of using AOP models for composing the Gang-of-Four design patterns. Our study categorizes different forms of pattern composition and studies the benefits and drawbacks of AOP in these contexts. We performed assessments of several pair-wise compositions taken from 3 medium-sized systems implemented in Java and two AOP models, namely, AspectJ and Compose*. We also considered complex situations where more than two patterns involved in each composition, and the patterns were interacting with other aspects implementing other crosscutting concerns of the system. In general, we observed two dominant factors impacting the pattern composability with AOP: (i) the category of the pattern composition, and (ii) the AspectJ idioms used to implement the design patterns taking part in the composition.  相似文献   

15.
AOP技术在J2EE系统构建中的应用   总被引:2,自引:0,他引:2  
在应用系统构建中,如何处理系统中的横切关注点问题是系统开发成功的关键。用OO技术来实现这些横切关注点,会导致系统侵入式实现,难于理解和维护。而AOP技术是用来模块化横切关注点的新技术。使用AOP技术来实现横切关注点,使得实现容易设计、理解和维护。而且AOP技术使系统开发高效、高质量,更有能力来实现新的特征。Spring是一个实现控制反转模式(IOC)和面向方面(AOP)的轻量级容器框架,它是用来帮助解决企业应用系统中公共问题和处理企业应用系统开发的复杂性。文中介绍了AOP的基本概念和Spring框架,并举例说明了AOP技术在J2EE系统中应用。  相似文献   

16.
面向方面的程序设计:概念、实现与未来   总被引:11,自引:0,他引:11  
面向对象程序设计(OOP)的出现极大地提高了软件的可读性、可维护性和可复用性,但OOP并没有彻底解决软件的维护和复用问题,本质上是因为OOP难以模块化处理软件系统的横切关注点,以至于业务逻辑代码和其它代码(如日志记录、安全验证等)相互“纠缠”在一起,使得程序难以维护和复用。面向方面的程序设计(AOP)由此诞生,它最主要的设计原则是模块化系统的横切关注点,将业务代码与其它代码解耦,在更高的抽象和分解层次上,进一步提高了软件的可维护性、可复用性和可扩展性。首先深度探索了AOP的起源,然后阐述了AOP的本质,接着介绍了AOP的基本概念并以最为流行的实现语言AspectJ为例,剖析了AOP的实现机制,最后讨论了AOP在软件开发、测试、分析、度量和重构等领域的研究状况。  相似文献   

17.
Aspect-oriented programming (AOP) is a novel programming paradigm that aims at modularizing complex software. It embraces several mechanisms including (1) pointcuts and advice as well as (2) refinements and collaborations. Though all these mechanisms deal with crosscutting concerns, i.e., a special class of design and implementation problems that challenge traditional programming paradigms, they do so in different ways. In this article we explore their relationship and their impact on modularity, which is an important prerequisite for reliable and maintainable software. Our exploration helps researchers and practitioners to understand their differences and exposes which mechanism is best used for which problem.  相似文献   

18.
面向方面编程(Aspect-Oriented Programming,AOP)是目前发展比较迅速的一种新的编程方法。它是面向过程、面向对象方法的进一步发展。AOP通过引入了方面概念,改进了关注点的分离(separation of concerns),减少代码缠结(code tangling),解决了横切关注点(crosscutting concerns)的问题,可以提高软件质量和效率。文章对AOP的基本概念、技术特点和AOP的技术框架现状进行了相关介绍。  相似文献   

19.
基于UML面向方面需求建模   总被引:1,自引:0,他引:1  
面向方面编程(AOP)提供模块化横切关注点的机制,有效地解决横切属性引起的代码混乱和代码分散等问题.但是,AOP目前大都用在程序级和执行级,在软件开发的早期阶段中运用较少.在需求分析阶段分离功能关注点和非功能关注点,运用UML类图、状态图对方面进行建模,并实现非功能关注点的编织,完成系统建模的整个过程,并在此基础上给出了方面间的检测和解决方法.  相似文献   

20.
AOP(Aspect-Oriented Programming)是一种支持分离系统横切关注点的软件复用技术。模块化良好的横切关注点就是方面,方面在编译时或运行时被织入系统。介绍了AOP的基本概念和CGLIB提供的动态扩展机制,详细阐述了如何在拦截器中执行指示并最终基于CGLIB动态实现AOP的方法。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号