# Developing Applications with Aspect-Oriented Change Realization

Valentino Vranić, Michal Bebjak, Radoslav Menkyna, Peter Dolog

► To cite this version:

Valentino Vranić, Michal Bebjak, Radoslav Menkyna, Peter Dolog. Developing Applications with Aspect-Oriented Change Realization. 3rd Central and East European Conference on Software Engineering Techniques (CEESET), Oct 2008, Brno, Czech Republic. pp.192-206, 10.1007/978-3-642-22386-0_15. hal-01572548

HAL Id: hal-01572548

https://inria.hal.science/hal-01572548

Submitted on 7 Aug 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Developing Applications with Aspect-Oriented Change Realization

Valentino Vranić¹, Michal Bebjak¹, Radoslav Menkyna¹, and Peter Dolog²

¹ Institute of Informatics and Software Engineering
Faculty of Informatics and Information Technologies
Slovak University of Technology,
Ilkovičova 3, 84216 Bratislava 4, Slovakia
vranic@fiit.stuba.sk, mbebjak@gmail.com, radu@ynet.sk

² Department of Computer Science
Aalborg University
Selma Lagerlöfs Vej 300, DK-9220 Aalborg EAST, Denmark
dolog@cs.aau.dk

**Abstract.** An approach to aspect-oriented change realization is proposed in this paper. With aspect-oriented programming changes can be treated explicitly and directly at the programming language level. Aspect-oriented change realizations are mainly based on aspect-oriented design patterns or themselves constitute pattern-like forms in connection to which domain independent change types can be identified. However, it is more convenient to plan changes in a domain specific manner. Domain specific change types can be seen as subtypes of generally applicable change types. This relationship can be maintained in a form of a catalog. Further changes can actually affect the existing aspect-oriented change realizations, which can be solved by adapting the existing change implementation or by implementing an aspect-oriented change realization of the existing change without having to modify its source code. Separating out the changes this way can lead to a kind of aspect-oriented refactoring beneficial to the application as such. As demonstrated partially by the approach evaluation, the problem of change interaction may be avoided to the large extent by using appropriate aspect-oriented development tools, but for a large number of changes, dependencies between them have to be tracked, which could be supported by feature modeling.

**Keywords:** change, aspect-oriented programming, generally applicable changes, domain specific changes, change interaction

## 1 Introduction

To quote a phrase, change is the only constant in software development. Change realization consumes enormous effort and time. Once implemented, changes get lost in the code. While individual code modifications are usually tracked by a version control tool, the logic of a change as a whole vanishes without a proper support in the programming language itself.
By its capability to separate crosscutting concerns, aspect-oriented programming enables to deal with change explicitly and directly at programming language level. Changes implemented this way are pluggable and—to the great extent—reapplicable to similar applications, such as applications from the same product line.

Customization of web applications represents a prominent example of that kind. In customization, a general application is being adapted to the client’s needs by a series of changes. With each new version of the base application all the changes have to be applied to it. In many occasions, the difference between the new and old application does not affect the structure of changes, so if changes have been implemented using aspect-oriented programming, they can be simply included into the new application build without any additional effort.

We have already reported briefly our initial efforts in change realization using aspect-oriented programming [1]. In this paper, we present our improved view of the approach to change realization and the change types we discovered. Section 2 presents our approach to aspect-oriented change realization. Section 3 introduces the change types we have discovered so far in the web application domain. Section 4 discusses how to deal with a change of a change. Section 5 describes the approach evaluation and identifies the possibilities of coping with change interaction with tool support. Section 6 discusses related work. Section 7 presents conclusions and directions of further work.

## 2 Changes as Crosscutting Requirements

A change is initiated by a change request made by a user or some other stakeholder. Change requests are specified in domain notions similarly as initial requirements are. A change request tends to be focused, but it often consists of several different—though usually interrelated—requirements that specify actual changes to be realized. By decomposing a change request into individual changes and by abstracting the essence out of each such change while generalizing it at the same time, a change type applicable to a range of the applications that belong to the same domain can be defined.

We will introduce our approach by a series of examples on a common scenario.<fnref n="3" /> Suppose a merchant who runs his online music shop purchases a general affiliate marketing software [9] to advertise at third party web sites denoted as affiliates. In a simplified schema of affiliate marketing, a customer visits an affiliate's site which refers him to the merchant's site. When he buys something from the merchant, the provision is given to the affiliate who referred the sale. A general affiliate marketing software enables to manage affiliates, track sales referred by these affiliates, and compute provisions for referred sales. It is also able to send notifications about new sales, signed up affiliates, etc.

The general affiliate marketing software has to be adapted (customized), which involves a series of changes. We will assume the affiliate marketing software

<footnote n="3">³ This is an adapted scenario published in our earlier work [1].</footnote>
is written in Java and use AspectJ, the most popular aspect-oriented language, which is based on Java, to implement some of these changes.

In the AspectJ style of aspect-oriented programming, the crosscutting concerns are captured in units called aspects. Aspects may contain fields and methods much the same way the usual Java classes do, but what makes possible for them to affect other code are genuine aspect-oriented constructs, namely: *pointcuts*, which specify the places in the code to be affected, *advises*, which implement the additional behavior before, after, or instead of the captured *join point* (a well-defined place in the program execution)—most often method calls or executions—and *inter-type declarations*, which enable introduction of new members into types, as well as introduction of compilation warnings and errors.

## 2.1 Domain Specific Changes

One of the changes of the affiliate marketing software would be adding a backup SMTP server to ensure delivery of the notifications to users. Each time the affiliate marketing software needs to send a notification, it creates an instance of the SMTPServer class which handles the connection to the SMTP server.

An SMTP server is a kind of a resource that needs to be backed up, so in general, the type of the change we are talking about could be denoted as *Introducing Resource Backup*. This change type is still expressed in a domain specific way. We can clearly identify a crosscutting concern of maintaining a backup resource that has to be activated if the original one fails and implement this change in a single aspect without modifying the original code:

```java
class AnotherSMTPServer extends SMTPServer {
    ...
}
public aspect BackupSMTPServer {
    public pointcut SMTPServerConstructor(URL url, String user, String password);
    call(SMTPServer.new(..)) && args (url, user, password);
    SMTPServer around(URL url, String user, String password);
    SMTPServerConstructor(url, user, password) {
        return getSMTPServerBackup(proceed(url, user, password));
    }
    SMTPServer getSMTPServerBackup(SMTPServer obj) {
        if (obj.isConnected()) {
            return obj;
        }
        else {
            return new AnotherSMTPServer(obj.getUrl(), obj.getUser(),
                obj.getPassword());
        }
    }
}
```

The `around()` advice captures constructor calls of the SMTPServer class and their arguments. This kind of advice takes complete control over the captured join point and its return clause, which is used in this example to control the
type of the SMTP server being returned. The policy is implemented in the `getSMTPServerBackup()` method: if the original SMTP server can't be connected to, a backup SMTP server class instance is created and returned.

## 2.2 Generally Applicable Changes

Looking at this code and leaving aside SMTP servers and resources altogether, we notice that it actually performs a class exchange. This idea can be generalized and domain details abstracted out of it bringing us to the *Class Exchange* change type [1] which is based on the *Cuckoo's Egg* aspect-oriented design pattern [16]:

```java
public class AnotherClass extends MyClass {
    ...
}

public aspect MyClassSwapper {
    public pointcut myConstructors(): call(MyClass.new());
    Object around(): myConstructors() {
        return new AnotherClass();
    }
}
```

## 2.3 Applying a Change Type

It would be beneficial if the developer could get a hint on using the Cuckoo's Egg pattern based on the information that a resource backup had to be introduced. This could be achieved by maintaining a catalog of changes in which each domain specific change type would be defined as a specialization of one or more generally applicable changes.

When determining a change type to be applied, a developer chooses a particular change request, identifies individual changes in it, and determines their type. Figure 1 shows an example situation. Domain specific changes of the D1 and D2 type have been identified in the Change Request 1. From the previously identified and cataloged relationships between change types, we would know their generally applicable change types are G1 and G2.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Generally applicable and domain specific changes.</figcaption></figure>
A generally applicable change type can be a kind of an aspect-oriented design pattern (consider G2 and AO Pattern 2). A domain specific change realization can also be complemented by an aspect-oriented design patterns, which is expressed by an association between them (consider D1 and AO Pattern 1).

Each generally applicable change has a known domain independent code scheme (G2’s code scheme is omitted from the figure). This code scheme has to be adapted to the context of a particular domain specific change, which may be seen as a kind of refinement (consider D1 Code and D2 Code).

# 3 Catalog of Changes

To support the process of change selection, the catalog of changes is needed in which the generalization-specialization relationships between change types would be explicitly established. The following list sums up these relationships between change types we have identified in the web application domain (the domain specific change type is introduced first):

- One Way Integration: Performing Action After Event

- Two Way Integration: Performing Action After Event

- Adding Column to Grid: Performing Action After Event

- Removing Column from Grid: Method Substitution

- Altering Column Presentation in Grid: Method Substitution

- Adding Fields to Form: Enumeration Modification with Additional Return Value Checking/Modification

- Removing Fields from Form: Additional Return Value Checking/Modification

- Introducing Additional Constraint on Fields: Additional Parameter Checking or Performing Action After Event

- Introducing User Rights Management: Border Control with Method Substitution

- User Interface Restriction: Additional Return Value Checking/Modifications

- Introducing Resource Backup: Class Exchange

We have already described Introducing Resource Backup and the corresponding generally applicable change, Class Exchange. Here, we will briefly describe the rest of the domain specific change types we identified in the web application domain along with the corresponding generally applicable changes. The generally applicable change types are described where they are first mentioned to make the sequential reading of this section easier. A real catalog of changes would require to describe each change type separately.

## 3.1 Integration Changes

Web applications often have to be integrated with other systems. Suppose that in our example the merchant wants to integrate the affiliate marketing software with the third party newsletter which he uses. Every affiliate should be a member
of the newsletter. When an affiliate signs up to the affiliate marketing software, he should be signed up to the newsletter, too. Upon deleting his account, the affiliate should be removed from the newsletter, too.

This is a typical example of the *One Way Integration* change type [1]. Its essence is the one way notification: the integrating application notifies the integrated application of relevant events. In our case, such events are the affiliate sign-up and affiliate account deletion.

Such integration corresponds to the *Performing Action After Event* change type [1]. Since events are actually represented by methods, the desired action can be implemented in an after advice:

```java
public aspect PerformActionAfterEvent {
    pointcut methodCalls(TargetClass t, int a): ...;
    after(/* captured arguments */): methodCalls(/* captured arguments */) {
        performAction(/* captured arguments */);
    }
    private void performAction(/* arguments */) { /* action logic */ }
}
```

The after advice executes after the captured method calls. The actual action is implemented as the `performAction()` method called by the advice.

To implement the one way integration, in the after advice we will make a post to the newsletter sign-up/sign-out script and pass it the e-mail address and name of the newly signed-up or deleted affiliate. We can seamlessly combine multiple one way integrations to integrate with several systems.

The *Two Way Integration* change type can be seen as a double One Way Integration. A typical example of such a change is data synchronization (e.g., synchronization of user accounts) across multiple systems. When a user changes his profile in one of the systems, these changes should be visible in all of them. In our example, introducing a forum for affiliates with synchronized user accounts for affiliate convenience would represent a *Two Way Integration*.

## 3.2 Introducing User Rights Management

In our affiliate marketing application, the marketing is managed by several co-workers with different roles. Therefore, its database has to be updated from an administrator account with limited permissions. A limited administrator should not be able to decline or delete affiliates, nor modify the advertising campaigns and banners that have been integrated with the web sites of affiliates. This is an instance of the *Introducing User Rights Management* change type.

Suppose all the methods for managing campaigns and banners are located in the campaigns and banners packages. The calls to these methods can be viewed as a region prohibited to the restricted administrator. The *Border Control* design pattern [16] enables to partition an application into a series of regions implemented as pointcuts that can later be operated on by advices [1]:

```java
pointcut prohibitedRegion(): (within(application.proxy) && call(void **(..)))
    || (within(application.campaigns.+) && call(void **(..)))
```
```java
    || within(application.banners.)
    || call(void Affiliate.decline(..)) || call(void Affiliate.delete(..));
}
```

What we actually need is to substitute the calls to the methods in the region with our own code that will let the original methods execute only if the current user has sufficient rights. This can be achieved by applying the *Method Substitution* change type which is based on an around advice that enables to change or completely disable the execution of methods. The following pointcut captures all method calls of the method called `method()` belonging to the `TargetClass` class:

```java
pointcut allmethodCalls(TargetClass t, int a):
    callERM中华人民共和国合同法(修订本) && target(t) && args(a);
```

Note that we capture method calls, not executions, which gives us the flexibility in constraining the method substitution logic by the context of the method call.

The pointcut `callERM中华人民共和国合同法(修订本)` captures all the calls of `TargetClass.method()`. The `target()` pointcut is used to capture the reference to the target class. The method arguments can be captured by an `args()` pointcut. In the example code above, we assume `method()` has one integer argument and capture it with this pointcut.

The following example captures the `method()` calls made within the control flow of any of the `CallingClass` methods:

```java
pointcut specificmethodCalls(TargetClass t, int a):
    callERM中华人民共和国合同法(修订本) && target(t) && args(a)
    && cflow(call(* CallingClass.*(..));
```

This embraces the calls made directly in these methods, but also any of the `method()` calls made further in the methods called directly or indirectly by the `CallingClass` methods.

By making an around advice on the specified method call capturing pointcut, we can create a new logic of the method to be substituted:

```java
public aspect MethodSubstitution {
    pointcut methodCalls(TargetClass t, int a): ...;
    ReturnType around(TargetClass t, int a): methodCalls(t, a) {
        if (...) {
            ... } // the new method logic
        else
            proceed(t, a);
    }
}
```

## 3.3 User Interface Restriction

It is quite annoying when a user sees, but can't access some options due to user rights restrictions. This requires a *User Interface Restriction* change type to be applied. We have created a similar situation in our example by a previous change implementation that introduced the restricted administrator (see
Sect. 3.2). Since the restricted administrator can't access advertising campaigns and banners, he shouldn't see them in menu either.

Menu items are retrieved by a method and all we have to do to remove the banners and campaigns items is to modify the return value of this method. This may be achieved by applying a *Additional Return Value Checking/Modification* change which checks or modifies a method return value using an around advice:

```java
public aspect AdditionalReturnValueProcessing {
    pointcut methodCalls(TargetClass t, int a): ...;
    private ReturnType retValue;
    ReturnType around(): methodCalls(captured arguments *) {
        retValue = proceed(* captured arguments *);
        processOutput(* captured arguments *);
        return retValue;
    }
    private void processOutput(* arguments *) {
        // processing logic
    }
}
```

In the around advice, we assign the original return value to the private attribute of the aspect. Afterwards, this value is processed by the `processOutput()` method and the result is returned by the around advice.

## 3.4 Grid Display Changes

It is often necessary to modify the way data are displayed or inserted. In web applications, data are often displayed in grids, and data input is usually realized via forms. Grids usually display the content of a database table or collation of data from multiple tables directly. Typical changes required on grid are adding columns, removing them, and modifying their presentation. A grid that is going to be modified must be implemented either as some kind of a reusable component or generated by row and cell processing methods. If the grid is hard coded for a specific view, it is difficult or even impossible to modify it using aspect-oriented techniques.

If the grid is implemented as a data driven component, we just have to modify the data passed to the grid. This corresponds to the Additional Return Value Checking/Modification change (see Sect. 3.3). If the grid is not a data driven component, it has to be provided at least with the methods for processing rows and cells.

Adding Column to Grid can be performed *after an event* of displaying the existing columns of the grid which brings us to the Performing Action After Event change type (see Sect. 3.1). Note that the database has to reflect the change, too. Removing Column from Grid requires a conditional execution of the method that displays cells, which may be realized as a Method Substitution change (see Sect. 3.2).

Alterations of a grid are often necessary due to software localization. For example, in Japan and Hungary, in contrast to most other countries, the surname
is placed before the given names. The *Altering Column Presentation in Grid* change type requires preprocessing of all the data to be displayed in a grid before actually displaying them. This may be easily achieved by modifying the way the grid cells are rendered, which may be implemented again as a Method Substitution (see Sect. 3.2):

```java
public aspect ChangeUserNameDisplay {
    pointcut displayCellCalls(String name, String value);
    call(void UserTable.displayCell(..)) || args(name, value);
    around(String name, String value): displayCellCalls(name, value) {
        if (name == "<the name of the column to be modified>") {
            ... // display the modified column
        } else {
            proceed(name, value);
        }
    }
}
```

## 3.5 Input Form Changes

Similarly to tables, forms are often subject to modifications. Users often want to add or remove fields from forms or perform additional checks of the form inputs, which constitute *Adding Fields to Form, Removing Fields from Form*, and *Introducing Additional Constraint on Fields* change types, respectively. Note that to be possible to modify forms using aspect-oriented programming they may not be hard coded in HTML, but generated by a method. Typically, they are generated from a list of fields implemented by an enumeration.

Going back to our example, assume that the merchant wants to know the genre of the music which is promoted by his affiliates. We need to add the genre field to the generic affiliate sign-up form and his profile form to acquire the information about the genre to be promoted at different affiliate web sites. This is a change of the *Adding Fields to Form* type. To display the required information, we need to modify the affiliate table of the merchant panel to display genre in a new column. This can be realized by applying the Enumeration Modification change type to add the genre field along with already mentioned Additional Return Value Checking/Modification in order to modify the list of fields being returned (see Sect. 3.3).

The realization of the *Enumeration Modification* change type depends on the enumeration type implementation. Enumeration types are often represented as classes with a static field for each enumeration value. A single enumeration value type is represented as a class with a field that holds the actual (usually integer) value and its name. We add a new enumeration value by introducing the corresponding static field:

```java
public aspect NewEnumType {
    public static EnumValueType EnumType.NEWVALUE =
        new EnumValueType(10, "<new value name>");
}
```
The fields in a form are generated according to the enumeration values. The list of enumeration values is typically accessible via a method provided by it. This method has to be addressed by an Additional Return Value Checking/- Modification change.

An Additional Return Value Checking/Modification change is sufficient to remove a field from a form. Actually, the enumeration value would still be included in the enumeration, but this would not affect the form generation.

If we want to introduce additional validations on the form input data to the system without built-in validation, an *Additional Parameter Checking* change can be applied to methods that process values submitted by the form. This change enables to introduce an additional check or constraint on method arguments. For this, we have to specify a pointcut that will capture all the calls of the affected methods along with their context similarly as in Sect. 3.2. Their arguments will be checked by the `check()` method called from within an around advice which will throw `WrongParamsException` if they are not correct:

```java
public aspect AdditionalParameterChecking {
    pointcut methodCalls(TargetClass t, int a): ...;
    ReturnType around(* arguments *) throws WrongParamsException:
        methodCalls(* arguments *) {
            check(* arguments *);
            return proceed(* arguments *);
        }
    void check(* arguments *) throws WrongParamsException {
        if (arg1 != <desired value>)
            throw new WrongParamsException();
    }
}
```

Adding a new validator to a system that already has built-in validation is realized by simply adding it to the list of validators. This can be done by implementing `Performing Action After Event` change (see Sect. 3.1), which would implement the addition of the validator to the list of validators after the list initialization.

## 4 Changing a Change

Sooner or later there will be a need for a change whose realization will affect some of the already applied changes. There are two possibilities to deal with this situation: a new change can be implemented separately using aspect-oriented programming or the affected change source code could be modified directly. Either way, the changes remain separate from the rest of the application.

The possibility to implement a change of a change using aspect-oriented programming and without modifying the original change is given by the aspect-oriented programming language capabilities. Consider, for example, advices in AspectJ. They are unnamed, so can't be referred to directly. The primitive pointcut `adviceexecution()`, which captures execution of all advices, can be restricted by the `within()` pointcut to a given aspect, but if an aspect contains several advices, advices have to be annotated and accessed by the `@annotation()`
pointcut, which was impossible in AspectJ versions that existed before Java was extended with annotations.

An interesting consequence of aspect-oriented change realization is the separation of crosscutting concerns in the application which improves its modularity (and thus makes easier further changes) and may be seen as a kind of aspect-oriented refactoring. For example, in our affiliate marketing application, the integration with a newsletter—identified as a kind of One Way Integration—actually was a separation of integration connection, which may be seen as a concern of its own. Even if these once separated concerns are further maintained by direct source code modification, the important thing is that they remain separate from the rest of the application. Implementing a change of a change using aspect-oriented programming and without modifying the original change is interesting mainly if it leads to separation of another crosscutting concern.

# 5 Evaluation and Tool Support Outlooks

We have successfully applied the aspect-oriented approach to change realization to introduce changes into YonBan, a student project management system developed at Slovak University of Technology. It is based on J2EE, Spring,Hibernate, and Acegi frameworks. The YonBan architecture is based on the Inversion Of Control principle and Model-View-Controller pattern. We implemented the following changes in YonBan:

- Telephone number validator as Performing Action After Event

- Telephone number formatter as Additional Return Value Checking/Modification

- Project registration statistics as One Way Integration

- Project registration constraint as Additional Parameter Checking/Modification

- Exception logging as Performing Action After Event

- Name formatter as Method Substitution

No original code of the system had to be modified. Except in the case of project registration statistics and project registration constraint, which where well separated from the rest of the code, other changes would require extensive code modifications if they have had been implemented the conventional way.

We encountered one change interaction: between the telephone number formatter and validator. These two changes are interrelated—they would probably be part of one change request—so it comes as no surprise they affect the same method. However, no intervention was needed.

We managed to implement the changes easily even without a dedicated tool, but to cope with a large number of changes, such a tool may become crucial. Even general aspect-oriented programming support tools—usually integrated with development environments—may be of some help in this. AJDT (AspectJ Development Tools) for Eclipse is a prominent example of such a tool. AJDT shows whether a particular code is affected by advices, the list of join points
affected by each advice, and the order of advice execution, which all are im-
portant to track when multiple changes affect the same code. Advices that do
not affect any join point are reported in compilation warnings, which may help
detect pointcuts invalidated by direct modifications of the application base code
such as identifier name changes or changes in method arguments.

A dedicated tool could provide a much more sophisticated support. A change
implementation can consist of several aspects, classes, and interfaces, commonly
denoted as types. The tool should keep a track of all the parts of a change. Some
types may be shared among changes, so the tool should enable simple inclusion
and exclusion of changes. This is related to *change interaction* which is exhib-
ited as dependencies between changes. A simplified view of change dependencies
is that a change may require another change or two changes may be mutually
exclusive, but the dependencies between changes could be as complex as fea-
ture dependencies in feature modeling and accordingly represented by feature
diagrams and additional constraints expressed as logical expressions [22] (which
can be partly embedded into feature diagrams by allowing them to be directed
acyclic graphs instead of just trees [8]).

Some dependencies between changes may exhibit only recommending char-
acter, i.e. whether they are expected to be included or not included together, but
their application remains meaningful either way. An example of this are features
that belong to the same change request. Again, feature modeling can be used to
model such dependencies with so-called default dependency rules that may also
be represented by logical expressions [22].

6 Related Work

The work presented in this paper is based on our initial efforts related to aspect-
oriented change control [6] in which we related our approach to change-based
approaches in version control. We identified that the problem with change-based
approaches that could be solved by aspect-oriented programming is the lack of
programming language awareness in change realizations.

In our work on the evolution of web applications based on aspect-oriented de-
sign patterns and pattern-like forms [1], we reported the fundamentals of aspect-
oriented change realizations based on the two level model of domain specific and
generally applicable change types, as well as four particular change types: Class
Exchange, Performing Action After Event, and One/Two Way Integration.

Applying feature modeling to maintain change dependencies (see Sect. 4)
is similar to constraints and preferences proposed in SIO software configura-
tion management system [4]. However, a version model for aspect dependency
management [19] with appropriate aspect model that enables to control aspect
recursion and stratification [2] would be needed as well.

We tend to regard changes as concerns, which is similar to the approach of
facilitating configurability by separation of concerns in the source code [7]. This
approach actually enables a kind of aspect-oriented programming on top of a ver-
sioning system. Parts of the code that belong to one concern need to be marked
manually in the code. This enables to easily plug in or out concerns. However, the major drawback, besides having to manually mark the parts of concerns, is that—unlike in aspect-oriented programming—concerns remain tangled in code.

Others have explored several issues generally related to our work, but none of this work aims at capturing changes by aspects. These issues include database schema evolution with aspects [10] or aspect-oriented extensions of business processes and web services with crosscutting concerns of reliability, security, and transactions [3]. Also, an increased changeability of components implemented using aspect-oriented programming [13, 14, 18] and aspect-oriented programming with the frame technology [15], as well as enhanced reusability and evolvability of design patterns achieved by using generic aspect-oriented languages to implement them [20] have been reported. The impact of changes implemented by aspects has been studied using slicing in concern graphs [11].

While we do see potential of configuration and reconfiguration of applications, our work does not aim at automatic adaptation in application evolution, such as event triggered evolutionary actions [17], evolution based on active rules [5], or adaptation of languages instead of software systems [12].

# 7 Conclusions and Further Work

In this paper, we have described our approach to change realization using aspect-oriented programming. We deal with changes at two levels distinguishing between domain specific and generally applicable change types. We introduced change types specific to web application domain along with corresponding generally applicable changes. We also discussed consequences of having to implement a change of a change.

Although the evaluation of the approach has shown the approach can be applied even without a dedicated tool support, we believe that tool support is important in dealing with change interaction, especially if their number is high. Our intent is to use feature modeling. With changes modeled as features, change dependencies could be tracked through feature dependencies. For further evaluation, it would be interesting to expand domain specific change types to other domains like service-oriented architecture for which we have available suitable application developed in Java [21].

**Acknowledgements** The work was supported by the Scientific Grant Agency of Slovak Republic (VEGA) grant No. VG 1/3102/06. We would like to thank Michael Grossniklaus for sharing his observations regarding our work with us.

# References

[1] M. Bebjak, V. Vranić, and P. Dolog. Evolution of web applications with aspect-oriented design patterns. In M. Brambilla and E. Mendes, editors, *Proc. of the 11th European Conference on Software Engineering and Development (Ecoleuk) 2004*.
ICWE 2007 Workshops, 2nd International Workshop on Adaptation and Evolution in Web Systems Engineering, AEWSE 2007, in conjunction with 7th International Conference on Web Engineering, ICWE 2007, pages 80–86, Como, Italy, July 2007.

[2] E. Bodden, F. Forster, and F. Steimann. Avoiding infinite recursion with stratified aspects. In R. Hirschfeld et al., editors, *Proc. of NODe 2006*, LNI P-88, pages 49–64, Erfurt, Germany, Sept. 2006. GI.

[3] A. Charfi, B. Schmeling, A. Heizenreder, and M. Mezini. Reliable, secure, and transacted web service compositions with AO4BPEL. In *4th IEEE European Conf. on Web Services (ECOWS 2006)*, pages 23–34, Zürich, Switzerland, Dec. 2006. IEEE Computer Society.

[4] R. Conradi and B. Westfechtel. Version models for software configuration management. *ACM Computing Surveys*, 30(2):232–282, June 1998.

[5] F. Daniel, M. Matera, and G. Pozzi. Combining conceptual modeling and active rules for the design of adaptive web applications. In *Workshop Proc. of 6th Int. Conf. on Web Engineering (ICWE 2006)*, New York, NY, USA, 2006. ACM Press.

[6] P. Dolog, V. Vranić, and M. Bieliková. Representing change by aspect. *ACM SIGPLAN Notices*, 36(12):77–83, Dec. 2001.

[7] Z. Fazekas. Facilitating configurability by separation of concerns in the source code. *Journal of Computing and Information Technology (CIT)*, 13(3):195–210, Sept. 2005.

[8] R. Filkorn and P. Návrat. An approach for integrating analysis patterns and feature diagrams into model driven architecture. In P. Vojtáš, M. Bieliková, and B. Charron-Bost, editors, *Proc. 31st Conference on Current Trends in Theory and Practice of Informatics (SOFSEM 2005)*, LNCS 3381, Liptovský Jan, Slovakia, Jan. 2005. Springer.

[9] S. Goldschmidt, S. Junghagen, and U. Harris. *Strategic Affiliate Marketing*. Edward Elgar Publishing, 2003.

[10] R. Green and A. Rashid. An aspect-oriented framework for schema evolution in object-oriented databases. In *Proc. of the Workshop on Aspects, Components and Patterns for Infrastructure Software (in conjunction with AOSD 2002)*, Enschede, Netherlands, Apr. 2002.

[11] S. Khan and A. Rashid. Analysing requirements dependencies and change impact using concern slicing. In *Proc. of Aspects, Dependencies, and Interactions Workshop (affiliated to ECOOP 2008)*, Nantes, France, July 2006.

[12] J. Kollár, J. Porubán, P. Václavík, J. Bandáková, and M. Forgáč. Functional approach to the adaptation of languages instead of software systems. *Computer Science and Information Systems Journal (ComSIS)*, 4(2), Dec. 2007.

[13] A. A. Kvale, J. Li, and R. Conradi. A case study on building COTS-based system using aspect-oriented programming. In *2005 ACM Symposium on Applied Computing*, pages 1491–1497, Santa Fe, New Mexico, USA, 2005. ACM.

[14] J. Li, A. A. Kvale, and R. Conradi. A case study on improving changeability of COTS-based system using aspect-oriented programming. *Journal of Information Science and Engineering*, 22(2):375–390, Mar. 2006.

[15] N. Loughran, A. Rashid, W. Zhang, and S. Jarzabek. Supporting product line evolution with framed aspects. In *Workshop on Aspects, Components and Patterns for Infrastructure Software (held with AOSD 2004, International Conference on Aspect-Oriented Software Development)*, Lancaster, UK, Mar. 2004.

[16] R. Miles. *AspectJ Cookbook*. O'Reilly, 2004.
[17] F. Molina-Ortiz, N. Medina-Medina, and L. García-Cabrera. An author tool based on SEM-HP for the creation and evolution of adaptive hypermedia systems. In *Workshop Proc. of 6th Int. Conf. on Web Engineering (ICWE 2006)*, New York, NY, USA, 2006. ACM Press.

[18] O. Papapetrou and G. A. Papadopoulos. Aspect-oriented programming for a component based real life application: A case study. In *2004 ACM Symposium on Applied Computing*, pages 1554–1558, Nicosia, Cyprus, 2004. ACM.

[19] E. Pulvermüller, A. Speck, and J. O. Coplien. A version model for aspect dependency management. In *Proc. of 3rd Int. Conf. on Generative and Component-Based Software Engineering (GCSE 2001)*, LNCS 2186, pages 70–79, Erfurt, Germany, Sept. 2001. Springer.

[20] T. Rho and G. Kniesel. Independent evolution of design patterns and application logic with generic aspects—a case study. Technical Report IAI-TR-2006-4, University of Bonn, Bonn, Germany, Apr. 2006.

[21] V. Rozinajová, M. Braun, P. Návrat, and M. Bieliková. Bridging the gap between service-oriented and object-oriented approach in information systems development. In D. Avison, G. M. Kasper, B. Pernici, I. Ramos, and D. Roode, editors, *Proc. of IFIP 20th World Computer Congress, TC 8, Information Systems*, Milano, Italy, Sept. 2008. Springer Boston.

[22] V. Vranić. Multi-paradigm design with feature modeling. *Computer Science and Information Systems Journal (ComSIS)*, 2(1):79–102, June 2005.