Introduction to Enterprise Aspect-Oriented Programming with AspectJ
Aspect-oriented programming (AOP) promises to revolutionize the practice of development by cleanly modularizing behavior that would otherwise scatter across entire programs. Because of this, it continues to gain momentum in the area of enterprise development, with support announced by IBM, BEA, JBoss, Spring, and others. Behind the headlines, however, are critical questions:
- How real is AOP?
- What problems can it solve today?
- How does it apply to enterprise applications?
- How can prospective adopters make an informed decision about trying to use AOP?
- What is the best adoption strategy?
- What are the long term possibilities?
- What standards are emerging?
This tutorial answers these questions and gives attendees the understanding they need to better evaluate AOP by showing AOP solutions to real problems in enterprise development. The first half of the tutorial focuses on AOP basics. Attendees will learn about the motivation for AOP and the sorts of problems that it aims to address. The first session also covers AspectJ syntax and key concepts. The second half of the tutorial presents examples of AOP applied to a range of problems in enterprise Java development, such as publishing business events, security, error handling, declarative transactions, and systems management.
Attendees gain a practical understanding of how AOP works, how it can be useful, and how to work effectively with AspectJ. Attendees learn AOP concepts, design patterns, and are in a good position to start applying the technology.
Goals/Key Points:
• Understand the case for AOP
o Know what is meant by a crosscutting concern
o See examples of concerns that are difficult to implement with OO
• Review a “side by side” example of implementing a business concern (customer billing) with AOP and without
• Gain an understanding of basic AOP concepts
o Join points
o Pointcuts
o Advice
o Static crosscutting
• Master the AspectJ syntax to required to realize the above concepts in code
• See how to write reusable aspects that can be re-applied to different problems
• Review concrete examples of AOP in action in the following enterprise problem domains
o Development-time
Tracing
Architectural policy enforcement with declare error and warning
o Infrastructure
System management with JMX
Performance management (including caching strategies)
Error handling: how to implement a consistent error-handling policy across application layers
Declarative transactions, use them without a J2EE container
o Domain specific
Security: going beyond the simplistic J2EE model with data-based security
Applying aspects to a specific business problem
• Look at the future of AOP
o Other frameworks and tools
o Impact of Java 5
o Standardization?
About Nick Lesiecki
Nicholas Lesiecki is a recognized expert on AOP and agile development. In addition to coauthoring Mastering AspectJ (Wiley, 2003) and Java Tools For Extreme Programming (Wiley, 2001), Nick is a member of AspectMentor, a consortium of experts in aspect-oriented software development. He has spoken about applying AspectJ to testing, design patterns, and real-world business problems in such venues as SD West, OOPSLA, and AOSD. He currently serves Google as a Software Engineer and Programming Instructor.
More About Nick »