 (Larger Image)
|
AspectJ Cookbook
by Russ Miles
Product Group: Book
Publisher: O'Reilly Media, Inc. (2004-12-20)
ISBN: 0596006543
EAN: 9780596006549
Dewy Decimal #: 005
Paperback: 354 pages
SKU: 080319029
Condition: Fine
Comments: 0596006543 New, never read, pages clean, other NEW O'Reilly and Microsoft computer books available at great prices. New, never read, may have minor wear on cover.
|
Editorial Reviews
|
Product Description
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.
|
Customer Reviews
|
AspectJ
Rating (2)
Date: 2005-03-02
1 out of 3 customers found this reveiw helpful
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.
|
|
teaches how to use, but look elsewhere for why
Rating (4)
Date: 2005-02-07
7 out of 8 customers found this reveiw helpful
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.
|
|
Neither tasty nor filling
Rating (3)
Date: 2005-01-30
2 out of 5 customers found this reveiw helpful
The largest part of the book covers AspectJ language elements. The chapters have titles such as "Capturing Join Points on ", "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
Rating (5)
Date: 2005-01-27
2 out of 4 customers found this reveiw helpful
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.
|
|
Excellent programmers' hand book for AspectJ
Rating (5)
Date: 2005-01-25
1 out of 2 customers found this reveiw helpful
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.
|
|
|