Advances in Smalltalk - 14th International Smalltalk Conference, ISC 2006, Prague, Czech Republic, September 4-8, 2006

von: Wolfgang De Meuter (Ed.)

Springer-Verlag, 2007

ISBN: 9783540718369 , 165 Seiten

Format: PDF, OL

Kopierschutz: Wasserzeichen

Windows PC,Mac OSX geeignet für alle DRM-fähigen eReader Apple iPad, Android Tablet PC's Online-Lesen für: Windows PC,Mac OSX,Linux

Preis: 39,95 EUR

Mehr zum Inhalt

Advances in Smalltalk - 14th International Smalltalk Conference, ISC 2006, Prague, Czech Republic, September 4-8, 2006


 

Application-Specific Models and Pointcuts Using a Logic Meta Language (p. 8)1 Introduction

Aspect-oriented Software Development (AOSD) is a recent, yet established development paradigm that enhances existing development paradigms with advanced encapsulation and modularisation capabilities [1,2]. In particular, aspect-oriented programming languages provide a new kind of abstraction, called aspect, that allows a developer to modularise the implementation of crosscutting concerns such as synchronisation, transaction management, exception handling, etc.

Such concerns are traditionally spread across variousmodules in the implementation, causing tangled and scattered code [3]. The improved modularity and separation of concerns [4], that can be achieved using aspects, intends not only to aid initial development, but also to allow developers to better manage software complexity, evolution and reuse.

One of the most essential characteristics of an aspect-oriented programming language is that aspects are not explicitly invoked but instead, are implicitly invoked [5]. This has also been referred to as the ‘obliviousness’ property of aspect orientation [6]. It means that the base program (i.e., the program without the aspects) does not explicitly invoke the aspects because the aspects themselves specify when and where they need to be invoked by means of a pointcut de.nition.

A pointcut essentially specifies a set of join points, which are specific points in the base program where the aspect will be invoked implicitly. Such a pointcut de.nition typically relies on structural and behavioural properties of the base program to express the intended join points. For example, if an aspect must be triggered at the instantiation of each new object of a particular class, its pointcut must capture those join points whose properties correspond with the execution of the constructor method.

As a result, each time the constructor method is executed (i.e. an instance is created), the aspect is invoked. In most aspect languages, this corresponds to the execution of an advice, which is a sequence of instructions executed before, after or around the execution of the join point. Unfortunately, in many cases, de.ning and maintaining an appropriate pointcut is a rather complex activity.

First of all, an aspect developer must carefully analyse and understand the structure of the entire application and the properties shared by all intended join points in particular. Some of these properties can be directly tied to abstractions that are available in the programming language but other properties are based on programming conventions such as naming schemes. ‘Object instantiation’ join points, for example, can be identified as the execution of constructor methods in languages such as Java.

Accessing methods, however, can be identified only if the developers adhere to a particular naming scheme, such as through put- and get- prefixes in the method names. In contrast, a language such as C# again facilitates the identification of such accessor method join points because they are part of the language structure through the C# ‘properties’ language feature. In essence, we can say that the more structure is available in the implementation, the more properties are available for the definition of pointcuts, effectively facilitating their definition.