首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 129 毫秒
1.
面向方面的编程的研究与实现   总被引:15,自引:1,他引:14  
面向方面的编程(AOP)是一种新的编程技术,它弥补了面向对象的编程(OOP)在跨越模块行为上的不足。 AOP 引进了Aspect,它将影响多个类的行为封装到一个可重用模块中,它允许程序员对横切关注点进行模块化,从而消除了OOP引起的代码混乱和分散问题,增强了系统的可维护性和代码的重用性。首先进行了AOP与OOP的比较,给出了AOP的原理和AOP的JBoss实现,最后介绍AOP在设计模式中的应用,并说明了使用它所带来的设计益处以及在应用AOP中应注意的问题。  相似文献   

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

3.
面向方面编程(AOP)是一种新的编程技术,它弥补了面向对象编程(OOP)在跨越模块行为上的不足,AOP引进了Aspect,允许程序员对横切关注点进行模块化,增强了系统的可维护性和代码的重用性。该文介绍了AOP的关键概念和开发流程,给出了AOP的原理和AOP的JBoss实现,并说明了AOP的优点和有待于进一步研究的问题。  相似文献   

4.
一种基于AOP的企业应用开发技术   总被引:5,自引:0,他引:5  
面向方面的编程(Aspect-OrientedProgramming,AOP)是一种新的编程技术,它弥补了面向对象的编程(Object-OrientedProgramming,OOP)在跨越模块行为上的不足。AOP引进了Aspect,它将影响多个类的行为封装到一个可重用模块中,它允许程序员对横切关注点(crosscuttingconcerns,即跨越典型职责界限的行为,例如日志记录)进行模块化,从而消除了OOP引起的代码混乱和分散问题,增强了系统的可维护性和代码的重用性。该文首先分析了AOP与OOP的比较,然后给出了AOP的原理和AOP的JBoss实现,最后介绍AOP在设计模式中的应用,并说明了使用它所带来的设计益处以及在应用AOP中应注意的问题。  相似文献   

5.
面向方面编程运用方面模块化横切关注点,构建出易于理解、易于扩展以及高质量的软件.然而,软件测试是软件质量保证的关键因素,那么开发有效的测试方法来检验AOP的正确性就显得十分重要.本文简述了面向方面编程的基本概念,详细介绍了四种AOP测试方法,并根据检验错误类型的能力对比了其中部分方法的性能,分析了AOP测试方法的研究现状、面临的技术问题以及未来的研究工作,最后总结了开发AOP测试技术和工具的重要性.  相似文献   

6.
基于EAI和AOP的软件安全测试及应用研究   总被引:1,自引:0,他引:1  
提高软件安全测试方法的易操作性和可复用性在软件工程中具有重要的研究意义.研究了一种用于测试软件安全的基于EAI模型(Environment Application Interaction Model)的软件错误注入测试方法,提出了基于面向方面编程(AOP)实现软件错误注入的安全测试模型(AOEAI)及其实现方法.对应用软件进行了实际测试,实验结果表明,该方法不仅是有效的,而且具有易操作性和可复用性强的特点.  相似文献   

7.
扩展UML用于面向方面的建模   总被引:3,自引:0,他引:3  
曾路  张立臣 《微机发展》2004,14(12):106-107,110
面向方面编程(AOP)向用户提供了把贯穿特性模块化和编排的能力,以便获得最大的代码重用以及解决代码混乱的问题。然而,目前还没有合适的对AOP的建模语言。文中讨论了一种扩展UML用于面向方面的建模的方法,并通过一个例子来说明这种方法的应用。  相似文献   

8.
面向方面程序设计是面向对象程序设计技术的补充和完善,高效的面向方面程序测试方法是面向方面程序的质量保证.提出一个基于谓词动态切片技术的测试方法.首先,构造完整的AOP语句控制流图,它包含AOP的方面、切入点、连接点、建议等因素.然后,根据完整的AOP语句控制流图生成所有路径,针对每条路径,构造其分支函数,计算得到相应的测试数据,若路径不可执行,则不再计算其测试数据.在这个过程中,通过构建简化动态依赖图来生成谓词动态切片,再用谓词动态切片来帮助调整测试数据.最后,将各路径的实际输出数据与期望输出数据相比较,即可判断该程序是否有错误.经实例分析和实验验证,此方法可以系统地测试一个完整的面向方面程序,提高了测试数据的生成效率,并产生有效的测试用例.  相似文献   

9.
面向方面程序设计及其实现技术   总被引:5,自引:2,他引:3  
面向方面程序设计(Aspect-Oriented Programming,以下文中简称AOP)是由Xerox Palo Alto研究中心(Xerox PARC)的研究人员提出的一种新的程序设计思想和模型,其目标是通过把问题分解成一系列功能模块和一系列贯穿多个功能模块的方面(aspect),然后再通过工具自动化的重新组织这些模块和方面,以获得系统的实现。本文讨论了AOP提出的背景、核心概念以及在Java中的实现。  相似文献   

10.
面向方面编程(AOP)向用户提供了把贯穿特性模块化和编排的能力,以便获得最大的代码重用以及解决代码混乱的问题.然而,目前还没有合适的对AOP的建模语言.文中讨论了一种扩展UML用于面向方面的建模的方法,并通过一个例子来说明这种方法的应用.  相似文献   

11.
面向方面体系结构建模是面向方面软件开发(AOSD)的重要组成部分,也是近些年面向方面领域研究的热点问题。传统的软件体系结构设计方法没有单独地考虑横切关注点。因此,在软件体系结构设计阶段,建模人员需要新的机制来描述这些横切关注点。本文首先提出一个以横切为中心的面向方面体系结构概念框架;然后通过在体系结构设计阶段引入该框架中的核心概念,提出一种在体系结构设计阶段建模横切关注点的方法,从而支持其在早期进行横切关注点的分离。  相似文献   

12.
Aspect-oriented programming (AOP) is a programmatic methodology to handle better modularized code by separating crosscutting concerns from the traditional abstraction boundaries. Automated testing, as one of the most demanding needs of the software development to reduce both human effort and costs, is a delicate issue in testing aspect-oriented programs. Prior studies in the automated test generation for aspect-oriented programs have been very limited with respect to the need for both adequate tool support and capability concerning effectiveness and efficiency. This paper describes a new AOP-specific tool for testing aspect-oriented programs, called RAMBUTANS. The RAMBUTANS tool uses a directed random testing technique that is especially well suited for generating tests for aspectual features in AspectJ. The directed random aspect of the tool is parameterized by associating weights to aspects, advice, methods, and classes by controlling object and joint point creations during the test generation process. We present a comprehensive empirical evaluation of our tool against the current AOP test generation approaches on three industrial aspect-oriented projects. The results of the experimental and statistical tests showed that RAMBUTANS tool produces test suites that have higher fault-detection capability and efficiency for AspectJ-like programs.  相似文献   

13.
程序切片是一种重要的程序分析技术,广泛应用于程序的调试、测试与维护等领域。面向方面程序设计作为一种新的软件开发范型,能够实现横切关注点的模块化,其特有的语言元素和功能为切片增加了难度。从静态切片和动态切片两种类型,讨论了面向方面程序切片技术。在此基础上,提出了一种基于简化动态依赖图的面向方面程序切片方法,可以减少动态依赖图中节点和边的数量,生成准确的面向方面程序的动态切片,从而有助于人们更好地对面向方面程序进行分析和理解。  相似文献   

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

15.
由于面向方面语言的不知觉性和多量化特点,模块分析和模块推理比传统方法学更加困难.为了解决面向方面语言的横切安全和横切质量问题,使用前提条件和后验条件约束横切模块和被横切模块,然而在横切过程中寻找前提条件和后验条件的失败原因十分微妙和复杂.为了分析一个横切关注点的行为影响,程序员需要考虑方面本身和这个方面影响的系统其他部分.当几个方面编织在同一个切入点,危险干扰分析变得更加复杂.类似面向对象语言中的行为子类型概念,引入横切不变性概念.为了检查由于破坏横切不变性引起的行为错误和其他4种简单行为错误,基于软件行为契约提出一个横切不变性检测算法.为了形式化这个算法,提出Crosscutting Contract演算和一组契约求解规则,并通过定义和证明契约完备性来保证契约求解过程的正确性.还使用一个例子说明如何使用这些契约求解规则检测和分析行为错误.  相似文献   

16.
方面单元测试框架的设计与实现   总被引:1,自引:0,他引:1       下载免费PDF全文
缺乏成熟的方面测试和方面冲突检测技术是阻碍面向方面软件编程大规模应用的瓶颈性问题。针对方面单元测试,提出了无需与基模块编织的方面单元的独立测试框架AJUnit。该框架运用Java注释和源码与字节码映射等技术实现编译细节的透明化。基于控制流和数据流分析,AJUnit综合运用随机测试数据生成、相对测试充分性准则的优化和指定路径的测试数据生成等技术实现测试过程的自动化。文中也介绍了以AJUnit为基础的方面单元测试工具的设计和实现。  相似文献   

17.

Context

Testing process is a time-consuming, expensive, and labor-intensive activity in any software setting including aspect-oriented programming (AOP). To reduce the testing costs, human effort, and to achieve the improvements in both quality and productivity of AOP, it is desirable to automate testing of aspect-oriented programs as much as possible.

Objective

In recent past years, a lot of research effort has been devoted to testing aspect-oriented programs but less effort has been dedicated to the automated AOP testing. This denotes that the current research on automated AOP testing is not sufficient and is still in a stage of infancy. In order to advance the state of the research in this area and to provide testers of AOP-based projects with a comparison basis, a detailed evaluation of the current automated AOP testing approaches in a thorough and experimental manner is required. Thus, the objective of this paper is to provide such evaluation of the current approaches.

Method

In this paper, we carry out an empirical study based on mutation analysis to examine four (namely Wrasp, Aspectra, Raspect, and EAT) existing automated AOP testing approaches, particularly their underlying test input generation and selection strategies, with regard to fault detection effectiveness. In addition, the approaches are compared in terms of required effort in detecting faults as part of efficiency evaluation.

Results

The experimental results and comparison provided insights into the effectiveness and efficiency of automated AOP testing with their respective strengths and weaknesses. Results showed that EAT is more effective than the other automated AOP testing approaches but not significant for all approaches. EAT was found to be significantly better than Wrasp at 95% confidence level (i.e. p < 0.05), but not significantly better than Aspectra or Raspect. Concerning the test effort efficiency, Wrasp was significantly (p < 0.05) efficient with requiring the lowest amount of test effort compared to the other approaches. Whereas, EAT showed to be not very efficient by recording the highest amount of test effort.

Conclusion

This implies that EAT can currently be the most effective automated AOP testing approach but perhaps less efficient. More generally, search-based testing (as underlying strategy of EAT approach) might achieve better effectiveness but at the cost of greater test effort compared to random testing (as underlying strategy of other approaches).  相似文献   

18.
The concept of aspect-orientation allows for modularizing crosscutting concerns as aspect modules. Aspect-orientation originally emerged at the programming level, and has stretched over other development phases now. Among them aspect-oriented modeling (AOM) is a hot topic, and there are many approaches supporting it. Petri net is a good formalism which can provide the foundations for modeling software and simulating its execution, but fails to resolve the problem of crosscutting concerns to support AOM. So, this paper presents an approach which extends the Petri net so as to support the AOM. In this paper, the basic functions of the system are modeled as base net by Petri net, and the crosscutting concerns are modeled as aspect nets. In order to analyze the whole system, woven mechanism is proposed to compose the aspect nets and base net together. The problems about aspect-aspect conflict and conflict relations may exist among the aspect nets matching the shared join point, thus this paper propose solutions to resolve them. The Object Petri net which is an extension of traditional Petri net is also extended so as to support aspect-oriented modeling here.  相似文献   

19.
The concept of aspect-orientation allows for modularizing crosscutting concerns as aspect modules. Aspect-orientation originally emerged at the programming level, and has stretched over other development phases now. Among them aspect-oriented modeling (AOM) is a hot topic, and there are many approaches supporting it. Petri net is a good formalism which can provide the foundations for modeling software and simulating its execution, but fails to resolve the problem of crosscutting concerns to support AOM. So, this paper presents an approach which extends the Petri net so as to support the AOM. In this paper, the basic functions of the system are modeled as base net by Petri net, and the crosscutting concerns are modeled as aspect nets. In order to analyze the whole system, woven mechanism is proposed to compose the aspect nets and base net together. The problems about aspectaspect conflict and conflict relations may exist among the aspect nets matching the shared join point, thus this paper propose solutions to resolve them. The Object Petri net which is an extension of traditional Petri net is also extended so as to support aspect-oriented modeling here.  相似文献   

20.
基于AOP的RBAC系统的设计与实现   总被引:1,自引:0,他引:1  
针对传统基于角色的访问控制(RBAC)实现方法在企业应用中存在的不足,将面向切面(AOP)的设计思想引入到RBAC系统的设计中,通过将系统的权限验证模块封装成单独的模块,与核心业务模块解耦合,在调用核心业务模块时借助动态AOP框架将权限验证模块在运行时动态地织入,从而实现一种通用的、可维护的、易扩展的权限验证系统。  相似文献   

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

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