Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Seam AOP

 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just felt that Spring AOP is not that rich/powerful as AspectJ. So, how you folks rate Seam AOP implementation?
 
Kuladip Yadav
Ranch Hand
Posts: 162
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just felt that Spring AOP is not that rich/powerful as AspectJ.


How do you say that ?
Spring 2.0 has built in support to AspectJ.
They are complementary to each other. (Check this thread)
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kuldeep Yadav:
How do you say that ?
Spring 2.0 has built in support to AspectJ.


Did I say its not having?
Of course we can use Spring AOP without AspectJ. I mean exactly that.
 
Dan Allen
Author
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going to interpret the question as "Spring has kick-ass AOP, how does Seam compare?"

There is a fundamental difference in philosophy on this topic between the Spring and Seam camps. The members of the Seam project do not believe that you need the rope that AspectJ gives you to hang yourself. Instead, the Seam folks believe that annotations should describe what your application is doing and annotation processors should provide that functionality. Once your metadata starts to look procedural (as it does with AspectJ), you have stretched it beyond its true utility.

To appreciate how strongly the Seam developers feel about using annotations as stereotypes, you only have to pick up a copy of the WebBeans specification. That specification embodies the essence of what Gavin was going for when he wrote Seam and he feels he has now captured with WebBeans (don't take that to mean that Seam is incomplete, it's just that Gavin continues to innovate).

To give you a more direct reply, Seam basically gives you synonym annotations, or can process the Java EE annotations directly, for @AroundInvoke and @Interceptors. Where Seam adds functionality is that @Interceptors is a meta-annotation, which means you annotate a custom annotation and then apply the custom annotation to the component. This puts a layer of abstraction between the interceptor and the business class. Your custom annotation describes the functionality that the interceptor provides. To cite an example, your custom annotation might be @Audit or @Secure.
[ October 08, 2008: Message edited by: Dan Allen ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Similar Threads