SPA2005 session: Aspect Oriented Programming (AOP) in Java

One-line description:A survey of tools used to support aspect oriented programming in Java and report of experiences gained, followed by a practical to give a rough idea of the tools using the source code samples provided
 
Session format: Workshop [read about the different session types]
 
Abstract:In object oriented software, business logic is encapsulated in business objects. However, implementation requirements can obscure this clean encapsulation. Beside the business logic itself, many objects also contain code such as logging statements, which do not belong to the business logic. This tangles the code, which makes it more difficult to understand, maintain and reuse. AOP addresses this problem by moving the implementation aspects out of the business objects. Tools to implement AOP for several programming languages have been introduced.

This session gives a short summary of the ideas and terminology of AOP in general and the implementation of Aspects for Java. An overview of four different AOP tools for Java is given, discussing the implementation used in the tools and their advantages and disadvantages for various kinds of software projects.

In the subsequent practical, the participants explore up to four different AOP tools using worked examples. For each of the four tools, the mode of operation is explained using a single slide. Each participant then has time to explore and complete the example using one of the tools. Prepared examples using ant scripts will be provided.
 
Audience background:Architects, designers and developers involved in the development of Java systems, who want to have an overview of AOP tools in Java and get a rough feeling for existing AOP tools. At least one participant in each group (see below) should bring their own laptop with JDK 1.4.2, Java 5 and Apache Ant installed.
 
Benefits of participating:* Come away with basic knowledge about available AOP tools for Java and some sample code

* A deeper understanding of how different AOP tools for Java work and which of them might be interesting for future use in a project

* First practical experience with an AOP tool
 
Materials provided:* Presentation slides

* A simple code example for each of the tools discussed, including build script (paper and electronic formats will be provided)
 
Process:* Introduce the objectives of the session

* Present the basic ideas and terminologies for AOP

* Explain the basic technology of how AOP can be implemented for Java

* Discuss four available tools. For each tool, a summary shows how aspects are implemented, which artifacts are used and how the aspects are implemented from definition to runnable code.

* Present a summary of the tools discussed, including advantages and disadvantages

* Sum up by outlining again the objectives of the session and naming the ways in which they have been addressed

* Ask the audience for their views and take questions, if time remains

* Introduction to the practical

* Split the participants up into groups (individuals is possible as well). Each group starts using one of the four tools to make first experiences. If enough time is left, a second tool can be used. While using the tool, each group lists questions, remarks, positive and negative points about the tool

* The important lessons learned, questions and remarks are briefly presented by each group at the end of the tutorial

00:00 - 00:05 - Objectives
00:05 - 00:25 - Basic terminology of AOP and implementation basics for Java
00:25 - 00:35 - Discussion of tool 1
00:35 - 00:45 - Discussion of tool 2
00:45 - 00:55 - Discussion of tool 3
00:55 - 01:05 - Discussion of tool 4
01:05 - 01:15 - Summary of the tools discussed and summary of session; Q&A
01:15 - 01:20 - Coffee break
01:20 - 01:30 - Short introduction to the exercises provided and their objectives
01:30 - 01:35 - Split the audience into up to four groups (one per tool)
01:35 - 02:05 - Work through example using tool
02:05 - 02:25 - Each group presents their remarks, positive and negative experiences made with the tool (five minutes per group)
02:25 - 02:30 - Summary of session
 
Outputs:* The presentation material

* Code samples including build script for each tool

* Questions asked and answers given

* Flip charts containing summary of experiences with each tool

* A list of the questions, remarks, positive and negative points about the tools, ideas and suggestions provided by the participants during the closing discussion will be provided by e-mail

* The BCS SPA SG Wiki will be used to facilitate further exchange of information among the participants
 
History:Merged from proposal ID 53 and 54.

Note: This session was proposed principally by Cornel Studach - I am co-presenting.
 
Presenters
1. Immo Hüneke
Zuhlke Engineering Ltd
2. Cornel Studach
Zuhlke Engineering Ltd.
3.