Intro
Speaker's qualifications
Overall presentation goal
Annotations and AOP: A perfect match
Agenda
Annotations overview
Metadata and annotations overview
Java and annotation
The AOP connection
AOP and metadata - 1
AOP and metadata - 2
AOP and metadata - 3
Using annotation with AOP
Expressing AOP constructs
Language extension - 1
Language extension - 2
Language extension - 3
Language extension - 4
Language extension example: @AspectJ
Code-style AspectJ syntax
The @AspectJ syntax
Consuming metadata using AOP
Consumption options - 1
Consumption options - 2
Consumption options - 3
Consumption options - 4
Consumption options - 5
Consumption options - 6
Join point selection without metadata
Metadata fortified selection
Consuming through aspects library
Aspect-classes collaboration - 1
Aspect-classes collaboration - 2
Aspect-classes collaboration - 3
Aspect-classes collaboration - 4
Aspect-classes collaboration - 5
Metadata: A holistic view
Multidimensional signature space - 1
Multidimensional signature space - 2
Multidimensional signature space - 3
Multidimensional Concern Space: Projection on business dimension
Projection on transaction management dimension
Projection on authentication dimension
Multidimensional Concern Interfaces
Concern interface: Transaction management
Metadata to Capture Join Points
Selection based on annotations - 1
Selection based on annotations - 2
Selection based on annotations - 3
Selection based on annotations - 4
Selection based on annotations - 5
Selection based on annotations - 6
Selection based on annotations - 7
Selection based on annotations - 8
Collecting annotations as context - 1
Collecting annotations as context - 2
Collecting annotations as context - 3
Collecting annotations as context - 4
Collecting annotations as context - 5
Collecting annotations as context - 6
Using annotation in advice
Data-driven access control - 1
Data-driven access control - 2
The code-style version
The @AspectJ version
Enforcing aggregate contamination - 1
Enforcing aggregate contamination - 2
Defining domain usage
Preventing aggregate contaminations
Allowing root access
Supplying metadata using AOP
Supplying annotations
Supplying annotations: AspectJ support
Supplying annotations: AspectJ support
Recap: Sensitive access monitoring
Adapting to existing code
Recap: Sensitive access monitoring
Adapting to existing code - 1
Adapting to existing code - 2
Annotation-driven participant pattern
Annotation-driven participant pattern
Annotation-driven participant pattern
Annotation-driven participant pattern
Annotation-driven participant pattern
Annotation-driven participant pattern
Annotation-driven participant pattern
Annotation bridging
Best practices
Metadata to capture join points
Challenges in using metadata
Best practices in using metadata
Avoid when you can
Avoid implementation-specific annotations
Use annotations that are already there
Best practices in using metadata
Summary
Specifying metadata using annotations has gained huge popularity since its introduction in Java 5. However, the story on consuming annotations isn't as clear. Reading and processing annotation is still a complex process often requiring you to understand byte-code manipulation tools and their low-level API. As a result, most developers shy away from using custom annotations, limiting their usages of annotations only those prescribed by frameworks. The result is missed opportunities for programming simplification. In this session, we explore how AOP can make it a simple task to consume annotation in a powerful manner.
This session explores many opportunities to consume annotations using Spring AOP and AspectJ. The examples discussed in this session cover a wide range from auditing, monitoring to security, transaction management, and policy enforcement. It also examines best practices in using annotations to avoid pre-processor like use of them.
Ramnivas Laddad is an author, speaker, consultant, and trainer specializing in aspect-oriented programming and J2EE. His most recent book, "AspectJ in Action: Practical aspect-oriented programming" (Manning, 2003), has been labeled as the most useful guide to AOP/AspectJ. He has been developing complex software systems using technologies such as Java, J2EE, AspectJ, UML, networking, and XML for over a decade. Ramnivas is an active member of the AspectJ community and has been involved with aspect-oriented programming from its early form. He speaks regularly at many conferences such as JavaOne, No Fluff Just Stuff, Software Development, EclipseCon, and O'Reilly OSCON. Ramnivas lives in San Jose, California.