Dienstag, 6. Oktober 1998 - Tutorials

Programm -  Tutorials -  Produktvorträge
Program -  Tutorials
- Product Presentation

 

Gregor Kiczales Xerox PARC
Aspect-Oriented Programming Using AspectJ(TM)

Traditionally, programs involving shared resources, multi-object protocols, error handling, complex performance optimizations and other systemic, or cross-cutting concerns have tended to have poor modularity. The implementation of these concerns typically ends up being tangled throughout the code, resulting in systems that are difficult to develop, understand and maintain.

Aspect-oriented programming is a new technique that has been proposed specifically to address this problem. Aspects are new programming constructs that work by cross-cutting the modularity of traditional programming constructs in carefully-designed and principled ways. So, for example, a single aspect can affect the implementation of a number
of methods in a number of classes. This enables aspects to capture the cross-modular structure of these kinds of concerns in a clean way. AspectJ(tm) is a general-purpose aspect-oriented extension to Java. Using AspectJ, we can:

  • Code resource sharing algorithms involving several classes in
  • a single aspect, rather as multiple code fragments tangled throughout the classes.
  • Code error handling protocols involving several classes in a single aspect, rather than as multiple code fragments tangled throughout the classes.
  • Code all the debugging and instrumenting support for a complex system in a few aspects, rather than as multiple code fragments tangled throughout the classes.
  • Code complex performance optimizations in a single aspect, rather than as multiple code fragments tangled throughout the classes.

This tutorial shows how to design and program with aspects and how aspects can be used to improve separation of concerns in complex software systems. Particular attention will be given to how AspectJ can support the implementation of common OO patterns. The audience should have experience with an object-oriented language, preferably Java.

 

Gregor Kiczales is a principal scientist at the Xerox Palo Alto Research Center. His interests are in software engineering and programming languages. His current projects include the development of aspect-oriented techniques for software engineering. He is co-author of the book "The Art of the Metaobject Protocol".