138

Aspect-Oriented Programming with AspectJ

Tutorial 75 minutes

Exploring an alternative approach to software modularity

Mark Skipper

Objects allow us to cleanly encapsulate many software functionality concerns inside well-defined object classes. But objects don't help so much with systemic concerns such as synchronization, multi-object protocols, resource sharing, distribution, memory management, replication and the like. These concerns are not well localised by class-based decomposition. They tend to cross-cut the system's class and module structure. In fact, much of the complexity and brittleness in existing systems appears to result from the implementation of these kinds of concerns being intertwined throughout the code. Aspects are a new unit of software modularity that provide a better way to manage cross-cutting concerns. Aspects, like objects, can be used in both design and implementation. Aspect-oriented design facilitates thinking about cross-cutting concerns as well-defined entities. Aspect-oriented programming languages make it possible to program directly in terms of design aspects as well as objects and classes.

This tutorial will introduce Aspect-oriented programming concepts and show how to deal with the problems of cross-cutting concerns. Concrete examples and illustrations will be given using the aspect-oriented proramming language AspectJ which adds aspect-oriented support to Java.

Mark Skipper (mcs@bcs.org.uk)

Centuria Consultants Ltd

Topics

Benefits

Participants will gain first-hand experience of using the aspect-oriented approach to structuring software. They will see how AspectJ allows separation of otherwise cross-cutting concerns in Java development. They will be introduced to the concepts and terminology of aspect-oriented programming. (Technical details of the AspectJ language will not be included.)

Session: Tutorial 75 minutes Level: basic
Audience:

The session is aimed at anyone involved in software development. Participants are expected to have some experience of building software using object-oriented techniques. Knowledge of an object-oriented programming language will be helpful but is not required. Experienced AspectJ programmers are unlikley to gain a great deal since this is a basic level turorial.

Max

Material

Presentation material for the tutorial will be available in advance.

Delivery

Tutorial (could be a workshop @ 3 hrs if the exercise turns out well)

Format

See above. After the initial introduction the session should be lead by the requirements of the participants as they tackle the exercise. A final conclusion session will reaffirm their learning experience.

The idea is that, after a suitable introduction, the participants will be able to pull out the ideas of AspectJ. Those who already know something of AspectJ will be able to apply their knowledge.


138