首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
In aspect-oriented programming (AOP) a cross-cutting concern is implemented in an aspect. An aspect weaver blends code from the aspect into a program’s code at programmer-specified cut points, yielding an aspect-enhanced program. In this paper, we apply some of the concepts from the AOP paradigm to data. Like code, data also has cross-cutting concerns such as versioning, security, privacy, and reliability. We propose modeling a cross-cutting data concern as a schema aspect. A schema aspect describes the structure of the metadata in the cross-cutting concern, identifies the types of data elements that can be wrapped with metadata, i.e., the cut points, and provides some simple constraints on the use of the metadata. Several schema aspects can be applied to a single data collection, though in this paper we focus on just two aspects: a reliability aspect and a temporal aspect. We show how to weave the schema for these two aspects together with the schema for the data into a single, unified schema that we call a schema tapestry. The tapestry guides the construction, interpretation, and validation of an aspect-enhanced data collection.  相似文献   

2.
In aspect-oriented programming (AOP) a cross-cutting concern is implemented in an aspect. An aspect weaver blends code from the aspect into a program’s code at programmer-specified cut points, yielding an aspect-enhanced program. In this paper, we apply some of the concepts from the AOP paradigm to data. Like code, data also has cross-cutting concerns such as versioning, security, privacy, and reliability. We propose modeling a cross-cutting data concern as a schema aspect. A schema aspect describes the structure of the metadata in the cross-cutting concern, identifies the types of data elements that can be wrapped with metadata, i.e., the cut points, and provides some simple constraints on the use of the metadata. Several schema aspects can be applied to a single data collection, though in this paper we focus on just two aspects: a reliability aspect and a temporal aspect. We show how to weave the schema for these two aspects together with the schema for the data into a single, unified schema that we call a schema tapestry. The tapestry guides the construction, interpretation, and validation of an aspect-enhanced data collection.  相似文献   

3.
在AOP中使用标注改进日志功能的实现   总被引:2,自引:0,他引:2       下载免费PDF全文
面向方面编程(AOP)可避免横切关注点对核心代码的不良影响,但AOP中的方法签名匹配模式难以精确表达系统中的横切点,使得在大中型系统中直接使用连接点匹配方式捕获某些横切点,同样会降低系统的可读性和模块化。该文以日志功能为例,研究如何使用标注来辅助AspectJ改进与日志功能相关的横切点定义,从而改善代码的可阅读性,提高程序的可维护性,并实现日志内容的可配置性。  相似文献   

4.
Aspect-oriented programming (AOP) has been successfully applied to application code thanks to techniques such as Java bytecode instrumentation. Unfortunately, with existing AOP frameworks for Java such as AspectJ, aspects cannot be woven into the standard Java class library. This restriction is particularly unfortunate for aspects that would benefit from comprehensive aspect weaving with complete method coverage, such as profiling or debugging aspects. In this article we present MAJOR, a new tool for comprehensive aspect weaving, which ensures that aspects are woven into all classes loaded in a Java Virtual Machine, including those in the standard Java class library. MAJOR includes the pluggable module CARAJillo, which supports efficient access to a complete and customizable calling context representation. We validate our approach with three case studies. Firstly, we weave existing profiling aspects with MAJOR which otherwise would generate incomplete profiles. Secondly, we introduce an aspect for memory leak detection that also benefits from comprehensive weaving. Thirdly, we present an aspect subsuming the functionality of ReCrash, an existing tool based on low-level bytecode instrumentation techniques that generates unit tests to reproduce program failures. Our aspect-based tools are concisely implemented in a few lines of code, and leverage MAJOR and CARAJillo for comprehensive aspect weaving and for efficient access to calling context information.  相似文献   

5.
Aspect-oriented programming (AOP) has emerged recently as a language concept for expressing cross-cutting concerns, mainly in object-oriented software. Since then, the concept has been applied to a wide variety of other contexts. In this paper, we explore some cross-cutting concerns for parallel programs of reactive systems: we propose an aspect language, Larissa, and a weaving mechanism, in a core language based on parallel communicating Mealy machines.  相似文献   

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

7.
面向方面编程分离了核心关注点和横切关注点,提供了模块化横切关注点的机制,很好地解决了面向对象技术处理横切关注点时存在的代码散布和代码纠缠问题.和日记记录、安全验证等业务一样,持久化也被认为是经典的横切关注点业务,适合用AOP来实现.分析了现有的基于AOP的持久化实现,发现大部分实现过于追求AOP要求的obliviousness特性,而在功能或性能上难以满足现实应用的需求.探讨了持久化的特点及持久方面化的机制,提出了一套实用的基于AOP的持久化框架.该框架保持了面向对象持久化技术的功能及性能,同时又具有方面化持久业务所带来的更高的可重用性、可维护性及可移植性.  相似文献   

8.
面向方面编程AOP(Aspect Oriented Programming)为开发者提供了一种机制来描述横切关注点.它能够自动地将横切关注点织入到面向对象的软件系统中,从而实现了横切关注点的模块化.然而AOP这种对横切关注点封装、织入的独特性为分析程序结构带来了困难,对传统的程序分析技术提出了新课题.通过分析AOP程序的特殊性,提出了基于AspectJ构造AOP程序控制流图的方法.该方案可以为AOP程序的理解、验证、测试以及重构提供控制流分析平台.  相似文献   

9.
在研究面向方面编程思想的基础上,提出了一种Web应用框架。论述了采用J2EE过滤器实现关注点引擎,通过配置文件实现初始化并在运行时动态组装系统关注点和核心关注点的原理与方法。基于框架设计并实现了毕业论文管理系统,实践表明了框架的正确性与有效性。  相似文献   

10.
模型驱动架构的软件开发方法能够直接生成可用的软件产品,但在开发过程中的建模与模型转换难以实现核心关注点与横切关注点的分离,从而导致模型的纠结和重复。基于模型层的面向方面思想(AOP)可以先将核心功能与横切功能分开独立建模,然后再通过编织技术将它们集成起来,从而有效地解决了这个问题。探讨了通过扩展UML语言使之能表现方面的特性的方法,以及如何针对MDA的不同层次来使用相对应的方面来表达。为模型转换的具体实现提供了可行的方法。  相似文献   

11.
《Computer》2001,34(4):18-21
As global digitalization and the size of applications expand at an exponential rate, software engineering's complexities are also growing. One feature of this complexity is the repetition of functionality throughout an application. An example of the problems this complexity causes occurs when programmers must change an oft-repeated feature for an updated or new version of an application. It is often difficult for programmers to find every instance of such a feature in millions of lines of code. Failing to do so, however, can introduce bugs. To address this issue, software researchers are developing methodologies based on a new programming element: the aspect. An aspect is a piece of code that describes a recurring property of a program. Applications can, of course, have multiple aspects. Aspects provide cross-cutting modularity. In other words, programmers can use aspects to create software modules for issues that cut across various parts of an application. Aspects have the potential to make programmers' work easier, less time-consuming and less error-prone. Proponents say aspects could also lead to less expensive applications, shorter upgrade cycles and software that is flexible and more customizable. A number of companies and universities are working on aspects or aspect-like concepts  相似文献   

12.
Aspect-based refactoring, called aspectualization, involves moving program code that implements cross-cutting concerns into aspects. Such refactoring can improve the maintainability of legacy systems. Long compilation and weave times, and the lack of an appropriate testing methodology are two challenges to the aspectualization of large legacy systems. We propose an iterative test driven approach for creating and introducing aspects. The approach uses mock systems that enable aspect developers to quickly experiment with different pointcuts and advice, and reduce the compile and weave times. The approach also uses weave analysis, regression testing, and code coverage analysis to test the aspects. We developed several tools for unit and integration testing. We demonstrate the test driven approach in the context of large industrial C++ systems, and we provide guidelines for mock system creation.  相似文献   

13.
目前AOP作为OOP的扩展和补充,成为软件工程领域中的研究热点,其核心思想是分离关注点,实现横切关注点的模块化。实现关注点分离的关键技术之一是方面的编织。重点阐述了AOP系统中方面的具体编织策略,包括方面编织实现策略和织入时间策略。详细介绍了目前四种主流AOP系统:AspectJ、AspectWerkz、Spring AOP以及JBoss AOP的编织机制和技术,通过分析和总结目前AOP系统方面编织策略的优缺点,提出了一种基于XML的图形化方面编织框架——XbGAWF,以及XbGAWF与不同AOP平台的集成模式。  相似文献   

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

16.
ContextAspect-Oriented Programming (AOP) is often described as a technique which improves the resulting software’s modularity. However, previous experiments seem to indicate that AOP is a technique which potentially increases the development or maintenance time. A possible reason why previous experiments were not able to show such a benefit is that those experiments did not consider situations where AOP has its strength: situations where aspects change.ObjectivesOur objective is to analyze whether initial higher development times caused by aspect-oriented programming can be compensated by frequent changes on the aspect code.MethodThis study is an empirical study with 15 subjects based on a within-subject design (repeated measurement) using two randomized groups. The measurement is development time until programming tasks completion. Additionally, an exploratory study is performed which analyzed (a) in separation out- and under-performing subjects with respect to development time, (b) the possible influence of the lines of code, (c) the possible influence of the number of advice and pointcuts, and finally (d) the possible impact of if-statements in the aspect-oriented solutions.ResultsThe experiment shows that frequent changes in the crosscutting code which do not change the aspect’s underlying structure compensate an initial higher development time for those concerns. But it also shows that changes, which do alter the concern’s structure again, result in higher development times when using AOP. Furthermore, the paper shows that the results are similar for out- and under-performing subjects in the experiment. Finally it shows that if changes are required in an aspect’s structure, subjects tend to perform such structural changes in a non-uniform way.ConclusionAOP is a potential rewarding investment into future code changes – but it has risks.  相似文献   

17.
18.
一种基于组件的aspect-oriented编程框架   总被引:2,自引:0,他引:2  
面向方面的编程(AOP:aspect-oriented programming)是一种新的编程技术.它引进了aspect,将影响多个模块的行为封装到一个可重用模块中,允许程序员对横切(crosscutting concerns)进行模块化,从而消除了面向对象编程(OOP:object-oriented programming)引起的代码混乱和分散问题.本文讨论了在服务体模型上实现的一种aspect-oriented编程框架.这个编程框架使用aspect组件,定义了对OOP语言的扩展,可方便将模块化的aspect代码扩展到源程序中,解决了OOP模型在这方面的不足.  相似文献   

19.
System Modularity has positive effects on software maintainability, reusability, and understandability. One factor that can affect system modularity is code tangling due to code clones. Code tangling can have serious cross-cutting effects on the source code and thereby affect maintainability and reusability of the code. In this research we have developed an algorithmic approach to convert code clones to aspects in order to improve modularity and aid maintainability. Firstly, we use an existing code-clone detection tool to identify code clones in a source code. Secondly, we design algorithms to convert the code clones into aspects and do aspect composition with the original source code. Thirdly, we implement a prototype based on the algorithms. Fourthly, we carry out a performance analysis on the aspects composed source code and our analysis shows that the aspect composed code performs as well as the original code and even better in terms of execution times.  相似文献   

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

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

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