AspectJ Cookbook
Aspect Oriented Solutions to Real-World Problems
By Russ Miles
Publisher: O'Reilly Media
Final Release Date: December 2004
Pages: 356

When Object Oriented programming (OO) first appeared, it was a revelation. OO gave developers the ability to create software that was more flexible and robust, but as time went on and applications became more sophisticated, too, certain areas of "traditional" OO architectures were found wanting. Aspect-oriented programming (AOP) addresses those issues by extending the OO approach even further.Many developers are interested in AOP--especially in AspectJ, the open source extension of the Java programming language that explicitly supports the AOP approach. Yet, although AspectJ is included with Eclipse, the increasingly popular open source IDE for Java, finding a practical and non-theoretical way to learn this language and other AOP tools and techniques has been a real problem.Until now. The AspectJ Cookbook offers a hands-on solution--in fact, several--with a wide variety of code recipes for solving day-to-day design and coding problems using AOP's unique approach.AOP allows the global properties of a program to determine how it's compiled into an executable program. Before AOP, important program design decisions were difficult to capture in actual code. Instead, the implementation of those design decisions--known as "aspects"--were scattered throughout, resulting in "tangled" code that was hard to develop and maintain. AOP has been compared to the manufacturing of cloth, in which threads are automatically interwoven. Without AOP, programmers must stitch the threads by hand.The AspectJ Cookbook shows readers why, and how, common Java development problems can be solved by using AOP techniques. With our popular problem-solution-discussion format, the book presents real world examples to demonstrate that AOP is more than just a concept; it's a development process that will benefit users in an immediate and visible manner.If you're interested in how AOP is changing the way software is developed, and how you can use AspectJ to make code more modular, easier to develop, maintain, evolve and deploy, this is the book that really delivers.

Table of Contents
Product Details
Recommended for You
Customer Reviews


by PowerReviews
oreillyAspectJ Cookbook

(based on 3 reviews)

Ratings Distribution

  • 5 Stars



  • 4 Stars



  • 3 Stars



  • 2 Stars



  • 1 Stars



Reviewed by 3 customers

Displaying reviews 1-3

Back to top

(3 of 4 customers found this review helpful)


Another win for the cookbook series

By Mike

from Undisclosed

Comments about oreilly AspectJ Cookbook:

If you've ever read a book from O'Reilly's Cookbook series, you'll know what to expect from the AspectJ Cookbook. You start by writing your first simple aspect on page 9, and the remainder of the book is examples based on a defined problem/task. Each solution is carefully explained, and most examples build on the examples before it.

The most interesting chapters to me were the ones on design patterns. "Recipes" are provided for implementing many traditional OO design patterns, as well as for implementing aspect-oriented design patterns. Though not a design pattern book, the sample AspectJ implementations are informative and interesting, and a notable number of chapters deal with OO patterns.

This book includes a short reference to the AspectJ API, though if you want a detailed reference to the language, a Cookbook might not be right for you. Presenting examples that build on what the reader learned in previous examples is an excellent way to teach if the reader is going through the book page-by-page; however, using "recipes" as a reference will require either an existing AspectJ familiarity or a detailed read of the first 10 chapters. This is not a criticism; the book is simply not designed to be a reference.

It is also not intended to address the concept of Aspect-oriented programming (AOP), at least not at an abstract level. It is all implementation, all the time; learning about AOP (through design patterns and the like) happens implicitly throughout the book but is never specifically addressed. Identifying concerns and cross-cutting concerns, AOP vs OOP and when to use them, and other higher-level concepts are not addressed. AOP is introduced in the first few pages using AspectJ-influenced language. This is not a weakness; it is simply something to be aware of.

My one actual complaint is that we hit chapter 16 before we learn that AspectJ can be used for more than just join points, that it can also modify/extend existing classes without changing the source for that class.

Overall, if you want to learn how to use AspectJ in real-life, for anything from pattern implementation to enterprise-level development, this book is for you.

(0 of 4 customers found this review helpful)


Javaranch Review of AspectJ Cookbook""

By Val

from Undisclosed

Comments about oreilly AspectJ Cookbook:

You can read my review of AspectJ Cookbook on my blog.

(0 of 1 customers found this review helpful)


AspectJ Cookbook

By Frank Chan

from Undisclosed

Comments about oreilly AspectJ Cookbook:

I would say that this is a survival guide more than a cookbook for the people who interested to try the AOP. This is book with a well structure to express its contents by problem-solution-discussion fomat. Reader can find what he need quickly from the book.

For the people who would try AOP the first thing they may concern is the scope of the Aspect J and how weaving the Aspect J into their current application like JSP, Servlet, Java application and also the compatibility with the IDE like Eclipse. The book first introduce these things to give a outlook of the ability of the Aspect J and then it introduce the main concern about capturing join points for the weaving the Aspect J to the application. However, it may be not easy to understand how the capturing join points can be used to solve the programming problem before you read the chapter 17 – 23 which about the application of the Aspect J. In 17 to 19 chapter it show how to use Aspect J to implement the common design pattern. In the final chapter it introduce the Aspect oriented design pattern and you may get the concept about AOP in this chapter

I suggest that the reader may skimming the chapter 17 – 23 first to get the outlook about the concept of AOP and solving problems by AOP.

Displaying reviews 1-3

Back to top

Buy 2 Get 1 Free Free Shipping Guarantee
Buying Options
Immediate Access - Go Digital what's this?
Ebook:  $38.99
Formats:  DAISY, ePub, Mobi, PDF
Print & Ebook:  $49.49
Print:  $44.99