The utility of Aspect-Oriented Programming is best demonstrated by using aspects yourself on a large programming project. I say "large" because, as with any technique for managing complexity, the benefits are most obvious when the code base is sufficiently large that one cannot keep all of the pieces in one's head at one time.
However, before one embarks on a large programming project with a new technology, it is wise to understand what it will do for you and how it can best be used to solve the problems that will arise, To this end, I present here three small examples. They are sufficiently simple for an experienced programmer to understand them almost immediately, but they do present enough of a structuring challenge that aspects really do make a contribution. Yes, all of these examples can be programmed without aspectsbut I believe that the aspect-oriented solutions are a significant improvement on the conventional alternatives.
The examples are as follows
In each case I describe the structure of the code and the development process, and provide source code.