tags:

views:

53

answers:

3
+1  Q: 

Learning AspectJ

I have read the documents in the following locations. Maybe I'm too dumb but I can't see too many useful examples that I can visualize and no much stay in my mind.

http://eclipse.org/aspectj
http://www.ibm.com/developerworks/java/library/j-aopwork8/index.html

Does anyone have any good and simple AspectJ getting start doc online? An eclipse project sample that I can run and play around with would be super!

+3  A: 

AspectJ In Action might help. It's got some unusual use cases that will help to get you beyond the logging "hello world" stage.

You can also get your feet wet with real usage by starting with Spring.

duffymo
I was just going to recommend that book. It is very readable, and really motivates when and when not to use AspectJ. It is now in its second edition, and has been updated to reflect how AspectJ relates to SpringAOP.
Andrew Eisenberg
(+1) The book is brilliant. It covers both traditional and `@AspectJ` syntax both with and without Spring in depth. There is no online reference that gets close to it.
seanizer
+2  A: 

I have written an example that shows you how AspectJ can work with annotations like @javax.inject.Inject here

I have also tried to simplify AspectJ with a cheat sheet here.

If you need to understand the theory, the AspectJ in Action is very good. For online resources, the Spring framework has a good reference document you can read here.

I hope it helps!

Espen
Nice cheat sheet (+1), but it would be even nicer as a PDF version made with a good layout program.
seanizer