Information Technology Reference
In-Depth Information
attempts to separate the pointcut from the advice, thereby making the advice
reusable. This method has subsequently been adopted by Suvée et al. [106]inthe
JAsCo language. The Caesar system [71], uses an aspect collaboration interface ,
a higher-level module concept that decouples the aspect implementation from the
aspect bindings, to enable reuse and componentisation of aspects.
As well as providing aspects, AspectJ also provides introductions ,amecha-
nism for adding fields, methods and interfaces to existing classes. Introductions are
motivated by the observation that concerns have an impact on the type structure
of programs which compromises modularisation, because different fields and meth-
ods in the type structure may come from different concerns. With introductions,
these fields and methods can be removed from the various concerns, modularised,
and applied to the various classes at runtime [46].
3.6 Framework-Based Implementations
One approach to the implementation of AOP is by providing an object-oriented
framework [80], a reusable semi-complete application that can be specialised to
produce custom applications [55]. A framework dictates the architecture of an
application by [41]:
• Defining its overall structure.
• Partitioning the application into classes and objects.
• Defining the key responsibilities of the classes and objects.
• Dictating how the classes and objects collaborate.
• Defining the application's thread of control.
These design parameters are predefined so that an application programmer can
concentrate on the specifics of the application and not on the architecture [41].
The important classes in a framework are usually abstract. An abstract class
is a class with no instances and is used only as a superclass [36]. As well as
providing an interface, an abstract class provides part of the implementation of
its subclasses by using either a template method or a hook method. A template
method defines part of the implementation in an abstract class and defers other
parts to subclasses by calling methods that are defined as abstract [41]. A hook
method defines a default implementation that can be overridden by subclasses
[86]. Abstract classes that are intended to be subclassed by the framework user
are known as hot spots as they encapsulate possible variations [85].
Frameworks usually come with a component library containing concrete sub-
classes of the abstract classes in the framework [36]. According to Fayad et al.
[36], frameworks provide the following benefits:
Modularity. Implementation details are hidden behind stable interfaces. This helps
to improve quality by localising the impact of design and implementation
changes.
Search WWH ::




Custom Search