首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
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.
Aspect-oriented programming (AOP) seeks to improve software modularity via the separation of cross-cutting concerns. AOP proponents often advocate a development strategy where programmers write the main application (base code), ignoring cross-cutting concerns, and then aspect programmers, domain experts in their specific concerns, weave in the logic for these more specialized cross-cutting concerns. This purely oblivious strategy, however, has empirically been shown to tightly couple aspects to base code in many cases, hindering aspect modularity and reuse. In essence, the more intricate the weaving between the cross-cutting concern and the base code (lexically and/or semantically), the harder it becomes to: (a) robustly specify how to weave the aspects in at the required points, (b) capture interactions between aspects and base code, and (c) preserve the correct weaving as the base code evolves.We propose an alternate methodology, termed cooperative aspect-oriented programming (Co-AOP), where complete lexical separation of concerns is not taken as an absolute requirement. Instead, cross-cutting concerns are explicitly modeled as abstract interfaces through explicit join points (EJPs). Programmers specify where these interfaces interact with base code either through explicit lexical references or via traditional oblivious aspects. This explicit awareness allows base code and aspects to cooperate in ways that were previously not possible: arbitrary blocks of code can be advised, advice can be explicitly parameterized, base code can guide aspects in where to apply advice, and aspects can statically enforce new constraints upon the base code that they advise. These new techniques allow aspect modularity and program safety to increase, and bring us towards a cooperative AOP paradigm.We illustrate our methodology via an example on transactions, and also give an initial evaluation of cooperative AOP through an empirical study on program extensibility comparing both the traditional and cooperative AOP methodologies. Initial results show that cooperative AOP techniques result in code that is less complex with lower overall coupling, facilitating extensibility.  相似文献   

3.
一种基于切面技术的数据验证设计与实现方案   总被引:1,自引:0,他引:1  
该文分析了传统数据验证的弊端,提出使用AOP技术来实现数据验证的方式:采用面向方面的编程(AOP)技术来实现应用程序的松散耦合,解决OOP和过程化方法不能够很好解决的横切(crosscut)问题;对横切关注点进行模块化,从而消除了OOP引起的代码混乱和分散问题,增强了系统的可维护性和代码的重用性。  相似文献   

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

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

6.
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.  相似文献   

7.
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.  相似文献   

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

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

10.
The following research questions structured our analysis: Does an open access institutional repository model respond to the needs of a non-academic documentation centre? Is EPrints software a good match to support the needs of the existing metadata describing Artexte’s collection? What are the customizations required to accommodate the existing Artexte metadata using EPrints? In order to address these questions, in this study we exported the existing metadata schema and sample data in Artexte’s three databases, performed a manual evaluation of metadata quality and compared the 49 Artexte fields to those available within the EPrints schema. We identified the metadata elements that mapped by default without the need for customization or modification and those which would need to be added to EPrints using configuration files. We also identified the customized software development to accommodate Artexte metadata using EPrints: the bilingual controlled vocabulary demands an extension of the EPrints subject taxonomy model with thesaurus semantic relationships. Comparing Artexte and EPrints metadata schemas, we found that 15 out of 49 fields mapped by default without the need for modification, 25 fields would need to be added to EPrints configuration files, and one field will be removed during the migration. With only the remaining eight fields requiring some special attention, we conclude that EPrints is suitable to the needs of Artexte’s bibliographic data management.  相似文献   

11.
面向方面的软件系统动态交互行为建模   总被引:1,自引:0,他引:1       下载免费PDF全文
面向方面编程是一种基于关注点分离的新技术,它成功地解决了面向对象编程中存在的代码缠结和散射问题。但是,在软件设计阶段,面向方面建模并没有得到很好的支持。通过分析面向方面编程的特点以及UML2.0新增的复合片段概念,本文提出了应用顺序图中的可选片段来表示Aspect与组件之间的横切交互行为,并给出将Aspect引入顺序图 的相关规定,实现了UML2.0顺序图对面向方面建模的支持。  相似文献   

12.
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.  相似文献   

13.
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.  相似文献   

14.
与面向时象编程相比而言,AOP依旧是一个极其新颖的概念.AOP是OOP的延续,是Aspect Oriented Programming 的缩写,意思是面向方面编程.AOP实际是GoF设计模式的延续,设计模式孜孜不倦追求的是调用者和被调用者之间的解耦,AOP可以说也是这种目标的一种实现.通过切面,我们可以将系统中各个不同层次上的问题隔离开来,实现统一集约式处理.各切面只需集中于自己领域内的逻辑实现.这一方面使得开发逻辑更加清晰,专业化分工更加易于进行;另一方面,由于切面的隔离,降低了耦合性,就可以在不同的应用中将各个切面组合使用,从而使得代码可重用性大大增强.  相似文献   

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

16.
基于Spring的面向方面编程   总被引:1,自引:0,他引:1  
面向方面编程(AOP)是面向对象编程(OOP)的一种扩展技术,能够很好的解决横切关注点问题,使得大型软件的设计和实现都能保持功能分离,解除代码耦合。采用AOP技术设计的软件,功能划分清晰,代码保持独立,系统维护简单。SpringAOP是AOP技术的一种实现技术。  相似文献   

17.
李伟  郑宁 《计算机工程与设计》2004,25(11):1985-1987
分析了常见代码规则强化方法中存在的问题,结合AOP(Aspect-Oriented Programming,简称AOP)的特点,给出了一种基于AOP的代码规则强化方法,并用方面来表示代码规则,通过把代码规则织入系统代码,在编译阶段和运行阶段实现了代码规则强化。  相似文献   

18.
AOP技术在国库集中支付系统的应用   总被引:3,自引:1,他引:2  
随着J2EE应用系统开发的深入,传统的面向对象编程OOP(Object-Oriented Programming)在解决系统横切关注点问题上存在不足,而面向方面编程AOP(Aspect-Oriented Programming)却能有效解决.介绍AOP的基本思想、开发过程及实现技术,并结合南昌市国库集中支付系统的开发,阐述了AOP在权限控制方面的设计.实践证明,通过AOP技术的使用,能有效地降低开发过程中代码间的耦合度,增加程序的灵活性和可重用性.  相似文献   

19.
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.  相似文献   

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

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