Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Review of "Eclipse AspectJ"

I just finished the new "Eclipse AspectJ" by the AspectJ team and thought this group might be interested in hearing about it. Congradulations to all of the authors, by the way - it is an impressive work. But I'm getting ahead of myself...

Title: "Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools"
Authors: Adrian Colyer, Andy Clement, George Harley, and Matthew Webster
Publisher: Addison-Wesley
Copyright: 2005, Pearson Educational Inc.
Details: http://www.amazon.com/exec/obidos/tg/detail/-/0321245873/102-7986454-6009739

(Disclaimer: like the authors, I also work for IBM. I do not work with them directly and do not speak for anyone other than myself.)

In Part 1, "Introducing Eclipse, AspectJ and AJDT", we are led through the building of a prototype insurance application (SimpleInsurance). Along the way, we are introduced to Eclipse, the AspectJ language and the AspectJ Development Tools (AJDT). The aspects are not presented as pre-built, but we get to see how they are selected, written, refactored and, even debugged. I found the discussion interesting, and saw new ways to use the tooling to prevent problems, but it did mean that even simple features went through a lot of hoops which were not always clear at the time. Thrown into the mix were a number of side-bars which explained the development philosophy and architecture behind AspectJ to a depth that I have only glimpsed in some of the mailing list discussions. I am using AspectJ and some of these sidebars took me several minutes to digest. I don't like to think about how a genuine newcomer would react. Thrown into the mix were screen captures of simple wizards and instructions on how to save files, making for some unintentionally funny contrasts.

In Part 2, "The AspectJ Language", things calm down as we go back to the beginning and cover the AspectJ language in full detail. As one would expect, they have produced the clearest and most comprehensive overview of the language I have seen. Everything is explained, generally using code snippets and object-interaction diagrams to reinforce their points. For complex issues, there are a number of sidebars which delve into the design of AspectJ. I learned many new things, not only about AspectJ but about the Java language itself.

Finally, in Part 3, "Putting it All Together", we are able to get into the "meat" of AOP and discuss how to develop our own AO application. We get to see how to adopt AspectJ, how to develop with aspects, and how to design applications with AO. Armed with a richer understanding of AspectJ, we take a look back at the insurance application that we worked on in Part 1 and see what benefits we've achieved. We briefly revisit the discussion about integrating AspectJ with Hibernate, and get to see how we would use Spring to improve our solution even further. There is great stuff here, but my only problem with this section is that there is just too much material to cover in the 100 pages it gets. As they say, a whole book could be written on this topic (any takers?).


I couldn't help comparing this book to "AspectJ In Action", though the two are quite different in many ways. "Eclipse AspectJ" definitely contains the most in-depth information about AspectJ and the AJDT. Using the same example (the SimpleInsurance application) throughout meant that we can see AspectJ being used in many different parts of development. There are many aspects in "Eclipse AspectJ" which I am keen to use in my applications. The problem is that I'm still debating with colleagues at work if I *should*. Where "AspectJ In Action" spent some time explaining different patterns and showing where different aspects should be used and where they should not, "Eclipse AspectJ" presents the tools but leaves the rest up to us. To my mind, that is the most important difference between the two. While "Eclipse AspectJ" cannot be matched for sheer depth, it does not always provide enough context to be used by new AspectJ developers. It is a good resource for existing AspectJ developers and will give you a complete understanding of the language and the tooling, but will be standing beside "AspectJ In Action" on my bookshelf.



Contents:
Part 1: Introducing Eclipse, AspectJ, and AJDT
 Ch 1: Getting Started
 Ch 2: First Steps in AJDT
 Ch 3: Extending the Application
 Ch 4: More AJDT

Part 2: The AspectJ Language
 Ch 5: An Overview of AspectJ
 Ch 6: Straight to the Point
 Ch 7: Take My Advice
 Ch 8: Inter-Type Declarations
 Ch 9: Aspects
 Ch 10: Using the AspectJ API

Part 3: Putting it All Together
 Ch 11: Adopting AspectJ
 Ch 12: Advanced AJDT
 Ch 13: Aspect-Oriented Design
 Appendix A: Command-Line AspectJ
 Appendix B: AspectJ Language Syntax
 Appendix C: Next Steps
 Appendix D: AJDT Icon Reference





Back to the top