AspectJ Cookbook Paperback – 30 Dec 2004
|New from||Used from|
- Choose from over 13,000 locations across the UK
- Prime members get unlimited deliveries at no additional cost
- Find your preferred location and add it to your address book
- Dispatch to this address when you check out
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Would you like to tell us about a lower price?
If you are a seller for this product, would you like to suggest updates through seller support?
Aspect Oriented Solutions to Real-World Problems
From the Author
This book focuses on getting things done with AspectJ; that's the first line of the preface in this book. Aspect Orientation has been sitting on the sidelines of software development for some time and in writing this book I wanted to show how you can actually make your development easier, cleaner and more flexible than ever before.
This is not a theoretical book; there are plenty of others on aspect orientation that can hit that button exceptionally well. This is all about AspectJ practice and the types of problems that can be solved using AspectJ.
However, this is a strange type of cookbook. The first third of the book is for the beginner who's trying to get an IDE, integrate AspectJ into their software build process and deploy AspectJ into different environments. The second third is all about understanding the AspectJ extensions to the Java language in order to provide a lookup for language features that you'll find yourself using all the time. The final third shows you how to take things to the next level by implementing common solutions and patterns in object-oriented and aspect-oriented software using AspectJ.
I wanted this book to be something that sat on your desk rather than the bookshelf, something that you use all the time as you take advantage of aspect orientation in your software development. That's actually how I use it and so hopefully that's how it will be useful to you too.See all Product description
Top customer reviews
Chapters 2 to 16 introduce AspectJ, starting from the most trivial and tedious details but ending with some advanced features.
The most interesting part of the book starts from Chapter 17. Chapter 17 to 19 cover a presentation of the well known design patterns using an aspect oriented approach; nearly all the design patterns are covered and, even if some of them aren't very clearly exposed, these chapters are very interesting and original.
Chapter 20 to 22 present some of the typical scenarios in which AOP can be applied; with every example is provided all the code you need to try it yourself. At the end of the book an (unfortunately) brief chapter talks about AOP Patterns.
This book has two faces: in the first 16 chapters, it is a typical and basic introduction to AspectJ, but without an adequate coverage of AOP... a rather eccentric choice, in my opinion. The second part of the book is a good advanced guide to AOP; it talks about AOP with a more theoretical approach, focusing more on architecture than on the tecnology itself.
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.
Most helpful customer reviews on Amazon.com
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.
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.
As with the other recipe books this is organized first into chapters around the fundamentals of the topic. Then within each chapter there is a set of problems, which are described, then solved using the technology. The solution is the described in detail and alternatives are provided. But where other recipe books tend to solve real world problems (e.g. connecting to Amazon web services), this book solves problems in the AOP technology itself.
Four chapters of the book are dedicated to implement GoF Design Patterns in AOP. This is interesting content. If you are an AOP enthusiast these sections alone will be worth the price of the book. But if you aren't a true believer you will not find justification for why you should implement the Design Patterns in AOP. You will only find out how they are implement. Take recipe 19.5, "Implementing the Chain of Responsibility Pattern". The problem is stated as, "You want to apply the chain of responsibility pattern using AspectJ." Ok, but why would I want to do that? What is the benefit? What are the drawbacks? This is never discussed.
Obviously a buy for the AOP faithful. Probably a buy for those seriously interested in AOP. But we are all still looking for the book that justifies AOP in terms of solutions to real world customer problems.
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.
Look for similar items by category
- Books > Computing & Internet > Computer Science > Information Systems
- Books > Computing & Internet > Digital Lifestyle > Online Shopping > Amazon
- Books > Computing & Internet > Networking & Security > Security
- Books > Computing & Internet > Programming > Languages
- Books > Computing & Internet > Programming > Languages & Tools
- Books > Computing & Internet > Programming > Software Design, Testing & Engineering > Design Patterns
- Books > Computing & Internet > Web Development