Aspect-oriented programming (AOP) is an emerging paradigm, gaining more and more importance due to the benefits it introduces to conventional programming methodologies. AOP deals with crosscutting concerns, and the concepts it relies on can be added to the Java language.
Part 1, “Understanding AOP and AspectJ” (chapters 1 through 4), introduces AOP, and explains how it can enhance object-oriented programming by adding the ability to implement crosscutting concerns. It also presents the anatomy of an AOP language (chapter 1). Chapters 2, 3, and 4 introduce the new concepts the AspectJ language adds to Java, and introduce the basic AspectJ syntax that enables a developer to start using the language, and writing simple programs.
Part 2, “Basic Applications of AspectJ” (chapters 5 through 7), presents practical examples illustrating the concepts studied in previous chapters. The first example is logging. Chapter 5 describes conventional ways of logging, using Java application programming interfaces (APIs) and demonstrates the limitations of such approaches. It then presents a solution to these limitations, using an AspectJ-based logging. The second example (chapter 6) is policy enforcement, which is a mechanism ensuring that system components follow certain programming practices, comply with specified rules, and meet assumptions. Chapter 7 presents another practical application dealing with pooling and caching.
Part 3, “Advanced Applications of AspectJ” (chapters 8 through 13), presents some patterns and idioms related to AspectJ (chapter 8). Chapters 9 through 12 present some advanced applications, such as thread safety, authentication, authorization, and transaction management, that are improved using AspectJ. Chapter 13 concludes the book, and encourages developers to employ AspectJ in different phases of the development cycle.
I highly recommend this book to everyone wishing to understand aspect-oriented programming, and to start with the AspectJ language. The book is well organized and self-contained. The illustrative applications, both basic and advanced, convince developers of the power of the AOP paradigm, and encourage them to employ AspectJ in all development phases.
This book is to aspect-oriented programming what the gang of four book [1] is to design patterns.