AspectJ Cookbook

ASIN: 0596006543
Average Customer Review: 3.5, based on 6 reviews.
Customer reviews (5 of 6)
AspectJ, 2005-03-02, Rating: 2.
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.
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.
teaches how to use, but look elsewhere for why, 2005-02-07, Rating: 4.
You need to already know the ideas behind aspect orient programming [AOP}, before opening this book. Plus a fluency in Java, by the way. While I have the latter fluency, I'd only met AOP briefly in a few papers.
Under the familiar O'Reilly cookbook format, the book has guidelines on various difficulties you might be having, when running AspectJ. It's a superset of Java. The new syntax is not so difficult to learn. True, it's more involved than writing a new class, that conforms to existing Java syntax. But a good Java programmer should quickly grasp how to implement crosscuts or advice.
As to the broader issue of whether you should use AOP at all, the book is silent. It tells you well how to use AOP in the form of AspectJ. But you need to decide, based on externalities, whether to take it up at all.
Under the familiar O'Reilly cookbook format, the book has guidelines on various difficulties you might be having, when running AspectJ. It's a superset of Java. The new syntax is not so difficult to learn. True, it's more involved than writing a new class, that conforms to existing Java syntax. But a good Java programmer should quickly grasp how to implement crosscuts or advice.
As to the broader issue of whether you should use AOP at all, the book is silent. It tells you well how to use AOP in the form of AspectJ. But you need to decide, based on externalities, whether to take it up at all.
Neither tasty nor filling, 2005-01-30, Rating: 3.
The largest part of the book covers AspectJ language elements. The chapters have titles such as "Capturing Join Points on <Something>", "Defining Advice", and "Enhancing Classes and the Compiler". Yet this is something that one very rarely wants to do. All these tasks are just means in the service of an end. To use the title's metaphor, these tasks are not recipes in themselves, they are only intermediate steps on the way to a meal. And at that they're not well captured by the format -- for my taste Laddad's "AspectJ in Action" does a much better job.
The three chapters on implementing the GOF patterns using AOP could have been interesting had the author just once strayed from the boring routine of presenting nothing but the mechanics of the respective pattern. Does he ever touch the question why anyone would want to use AOP to implement these patterns? If he does, it must have been well-hidden. Also, there are a lot of similarities which are more than superficial in the AOP implementations. As it stands, the original work by Jan Hannemann, on which these chapters are based, is a much more relishable read.
Then, at the end of the book, there are three chapters on applying AOP/AspectJ at the component, application, and enterprise level as well as one on AO design patterns. These chapters are the model for what the whole book should have been like, in my opinion. They finally deal with real-world problems and how AOP/AspectJ helps in solving them better than earlier approaches do.
Comprehensive and practical, 2005-01-27, Rating: 5.
Because of AspectJ's complex syntax it really benefits from a cookbook-style approach. I find the abstract concepts of AOP are somtimes a lot easier to understand than the AspectJ syntax (involving aspects, pointcuts and advice) needed to implement them.
Russell Miles has done a great job of structuring the book in a logical way. The book begins with recipes for compilation and deployment of Aspectj code using all the usual tools. The second section explains how to capture join-points on all the event types supported by AspectJ, ie. method-calls, exception catch blocks, object initialization etc. These first two sections form a good starting point reference for AspectJ syntax.
The bulk of the rest of the book contains recipes for practical use of aspects. I'm no expert on the topic but these chapters struck me as quite a good selection of the 'cross-cutting' concerns that people usually bring up in AOP discussions. eg. language extensions, object persistence, logging and tracing, virtual mock objects, RMI, lazy loading, transaction handling, security policies etc. The author also includes recipes for using Aspects to implement each of the GoF patterns. I found some of these recipes more interesting than practical - the benefits of using aspects seemed tenous in some cases (do all of them really involve cross-cutting concerns?) although they widened my view of the potential applications of AOP.
I generally found the recipes very well written and clear. The book also includes many UML sequence diagrams that are great for showing how aspects get woven in. I think AspectJ really needed a book like this - all in all a great contibution to the O'Reilly series.
Russell Miles has done a great job of structuring the book in a logical way. The book begins with recipes for compilation and deployment of Aspectj code using all the usual tools. The second section explains how to capture join-points on all the event types supported by AspectJ, ie. method-calls, exception catch blocks, object initialization etc. These first two sections form a good starting point reference for AspectJ syntax.
The bulk of the rest of the book contains recipes for practical use of aspects. I'm no expert on the topic but these chapters struck me as quite a good selection of the 'cross-cutting' concerns that people usually bring up in AOP discussions. eg. language extensions, object persistence, logging and tracing, virtual mock objects, RMI, lazy loading, transaction handling, security policies etc. The author also includes recipes for using Aspects to implement each of the GoF patterns. I found some of these recipes more interesting than practical - the benefits of using aspects seemed tenous in some cases (do all of them really involve cross-cutting concerns?) although they widened my view of the potential applications of AOP.
I generally found the recipes very well written and clear. The book also includes many UML sequence diagrams that are great for showing how aspects get woven in. I think AspectJ really needed a book like this - all in all a great contibution to the O'Reilly series.
Excellent programmers' hand book for AspectJ, 2005-01-25, Rating: 5.
This is an excellent practical guide to incorporating Aspects, in particular AspectJ, into your object-oriented software skillset.
This book is not a theoretical study of AOP; rather, it is a guide book for the software engineer who has already decided that using Aspects will benefit his or her software and is now looking for a 'How-To'. As a handbook, it begins with how to install AspectJ; how to build projects with Eclipse and Ant; and also looks at how to deploy AO applications, web applications and web services. It then goes on to look at basic and advanced AspectJ features and usage. As a side note, the Eclipse IDE provides great visual AspectJ support and is worth having a look at if you are planning on using AspectJ ;)
This is a book that a software developer can dip into when programming using Aspects - to find out how to do something; or using the design pattern chapters - how to do it better.
This book is not a theoretical study of AOP; rather, it is a guide book for the software engineer who has already decided that using Aspects will benefit his or her software and is now looking for a 'How-To'. As a handbook, it begins with how to install AspectJ; how to build projects with Eclipse and Ant; and also looks at how to deploy AO applications, web applications and web services. It then goes on to look at basic and advanced AspectJ features and usage. As a side note, the Eclipse IDE provides great visual AspectJ support and is worth having a look at if you are planning on using AspectJ ;)
This is a book that a software developer can dip into when programming using Aspects - to find out how to do something; or using the design pattern chapters - how to do it better.
