We have all been
frustrated by difficult to maintain code. Some code is difficult to
maintain because it does too much - e.g. handling transactions,
persistence and security, as well as implementing business rules.
Changing that kind of code requires you to understand and tackle many
different concerns. Other code might be difficult to maintain because
the implementation of a particular feature (e.g. audit logging) is
scattered throughout the code base. Changing the implementation of that
kind of feature involves changing many components. This talk describes
how to improve the maintainability of enterprise Java applications by
using dependency injection, and Aspect Oriented Programming. We will
show how you can implement business logic using POJOs that are decoupled
from infrastructure concerns such as persistence, security and
transaction management. We will also describe how to modularize concerns
such as audit logging that are normally implemented by code that is
mixed in with the business logic. The presentation has numerous Spring
and AspectJ examples.

You can download the slides from here:
presentation (pdf)
and the source code examples from
here.