The Fractal Aspect Component project

Fractal Aspect Component (FAC) is an extension of the Fractal component model (see Figure 1) to support Aspect-Oriented Programming (AOP).

Table of contents

FAC Concepts

Figure 1: Fractal concepts and notation

FAC realizes an unification of Component-Based Software Development (CBSD) and Aspect-Oriented Software Development (AOSD). FAC makes no dictinction between the behavior of an aspect and a plain component. As a result, aspects behavior are implemented with plain objects and woven to components by mean of a new aspect composition mechanism: the aspect connector.

An aspect connector is actually a composition of several new concepts introduced to the Fractal component model (see Figure 2):

  • An aspect binding which connects a component and an aspect together. It reifies the individual relationship between an aspect and a regular component. A regular component exposes a set of join points on which aspects can be woven. The join point model (JPM) of FAC focuses on incoming and outgoing calls on the operations of client and server interfaces.

  • A weaving interface is a control interface in Fractal which support the setting of aspect bindings. A control interface in Fractal can also intercept the execution of client and server interface operations. This way, a weaving interface of a component manages the exposed join points of the component. A weaving interface is also able to change the order of execution of aspects connected to the component operations or eventually lock the access to some operations, for security reason.

  • An aspectizable component is a component supporting the weaving interface. It is a component which can be advised by aspects.

Figure 2: FAC concepts and notation

  • An advice interface is the server interface on which an aspect binding is bound to. Similarly to advices in AOP, an advice interface may be of before, after, or around type.

  • An aspect component is a Fractal component supporting the weaving interface. It is seen in FAC as a kind of component connector which aims at building more complex composition when simple aspect ordering is not enough. In simple cases, the aspect component just delegates the intercepted call to a plain component implementing the behavior of an aspect. For instance, a logging aspect would be represented by a Log component and a Log aspect component. The aspect component can work on the context of interception thanks to its advice interface. This advice interface will simply call the log service of the Log component. This way the Log component is built as a reusable component that can be used in an aspect oriented way or not.

  • An aspect domain is a Fractal composite component which reifies the domain of an aspect component. It makes use of the shared component notion of Fractal. When a component is bound to an aspect component with an aspect binding, the aspect domain is automatically created and the component is added to the composite. As a result, the component is now shared by several composites.

FAC Methodology

FAC methodology consists out of three steps (see FAC tutorial for an illustration).

  • Step 1: Identify and design the crosscutting concern as an assembly of plain components
  • Step 2: Write the aspect component(s) to integrate the crosscutting concern
  • Step 3: Weave the aspect component(s) using Fractal ADL, using FAC API, or using Fractal Explorer.