To allow the creation of truly modular software, OOP has evolved into aspect-oriented programming. AspectJ is a mature AOP implementation for Java, now integrated with Spring.AspectJ in Action, Second Edition is a fully updated, major revision of Ramnivas Laddad's best-selling first edition. It's a hands-on guide for Java developers. After introducing the core principles of AOP, it shows you how to create reusable solutions using AspectJ 6 and Spring 3. You'll master key features including annotation-based syntax, load-time weaver, annotation-based crosscutting, and Spring-AspectJ integration. Building on familiar technologies such as JDBC, Hibernate, JPA, Spring Security, Spring MVC, and Swing, you'll apply AOP to common problems encountered in enterprise applications.This book requires no previous experience in AOP and AspectJ, but it assumes you're familiar with OOP, Java, and the basics of Spring."Clear, concisely worded, well-organized ... a pleasure to read."-From the Foreword by Rod Johnson, Creator of the Spring Framework"This book teaches you how to think in aspects. It is essential reading for both beginners who know nothing about AOP and experts who think they know it all."- Andrew Eisenberg, AspectJ Development Tools Project Committer"Ramnivas showcases how to get the best out of AspectJ and Spring."-Andy Clement, AspectJ Project Lead"One of the best Java books in years."-Andrew Rhine, Software Engineer, eSecLending"By far the best reference for Spring AOP and AspectJ."-Paul Benedict, Software Engineer, Argus Health Systems"Ramnivas expertly demystifies the awesome power of aspect-oriented programming."-Craig Walls, author of Spring in Action
Unfortunately this book didn’t age too well as it’s based on pre-Java 8 features and Spring versions that only support XML configuration. This means that many details are now wrong or irrelevant. Also in my opinion some examples are designed using a rather aging view of OOP, one that doesn’t make use of more functional patterns to solve certain problems. In some cases, taking this approach into account would make aspects redundant. Aside from this point, I found the book interesting in that it painted a very comprehensive picture of AOP, and this can help having an additional tool under the belt should the need arise. I’ve also rarely seen a book going into such a painstaking level of detail. I mean this in a good way, as most of the times the lack of detail leaves me with the frustration of not being able to answer the question: how do I use this in real life? In this regard, it’s obvious to me that the author put a lot of effort in making sure that readers could benefit practically from the exposed concepts.