• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AspectJ and AOP in general

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ramnivas,
What do you think of the current buzz surrounding AOP in general these days what with BEA exposing aspectj pointcuts in their 8.1? release and JBoss going ahead and releasing their own AOP Framework bundled into their app server. It seems that the case for aspects is being coded out right as we speak which I find refreshing and exciting.
Personally I like the idea of AOP, and see it as a way to make OOP cleaner OOP by extracting all the unrelated behaviour into aspects but how do you feel the adoption into the general programming populace will go? I work on J2EE for a living and personally would like to slowly start introducing AOP into my projects, to my team etc...How would you suggest someone to go about doing that in a practical way?
One last thing, AspectJ is a language based AOP implementation but all the other implementations we are seeing are not i.e. aspectwerks,jboss aop,etc...do you have any insight into strengths/weaknesses?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Andre, can you point me at something (semi)official regarding BEA exposing WebLogic's internal aspect stuff?
 
Andre Tow
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read about it on a few places one is here http://freeroller.net/page/cpurdy/20030628#tss_symposium_live_j2ee_by
and also saw the kit here:http://dev2dev.bea.com/resourcelibrary/utilitiestools/monitoring.jsp
[ September 16, 2003: Message edited by: Andre Mermegas ]
 
Andre Tow
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh I also forgot about nanning, another AOP impl.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the links, Andre, but it seems that the link to Cameron's blog isn't working.
 
Andre Tow
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thats because freeroller sucks. hehe it will be up eventually i'd guess.
 
Author
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Andre,
Great questions! This is indeed an exciting time of AOP/AspectJ!
The buzz surrounding AOP (and that includes many heated discussions!) is very healthy. The result of these discussions is likely to help in solidifying the AOP methodology. At the same time, practical applications and experience gained through them is vitally important to the evolution of AOP.
On AOP approaches:
All the AOP approaches share a few commonalities � the join point model being the most prominent one. The differences are in how the weaving rules are expressed and how the weaving takes place.
Here is a high-level summary of differences between various AOP approaches:
  • Expression of rules: AspectJ expresses rules using extension to the Java programming language, whereas AspectWerkz, JBoss/AOP, and Nanning aspects do the same thing through a combination of a framework and an XML-based language.
  • Weaving: In the standard AspectJ offering, weaving occurs during the compilation phase (however, you don�t need access to source code; just byte code is sufficient), whereas in other approaches, weaving happens at runtime (class loading time, to be precise). With AspectJ, it is certainly possible to use runtime weaving similar to that in AspectWerkz (with BEA Weblogic�s AspectJ support being the proof).


  • There are other differences as well, but they are of secondary importance and may disappear over time. For example, AspectJ�s pointcut support is very rich, but AspectWerkz is adding new pointcuts to match those in AspectJ (the most recent being the control-flow based pointcuts).
    On AOP adaptation:
    �AspectJ in Action� provides guidance on AOP adaptation through chapter introductions and summaries as well as includes a detailed discussion in the final chapter -- "The next step". The most important thing to remember is try simple aspects first. I recommend logging and policy enforcement as the first set of aspects. On most occasion you can take readymade aspects and compile them along with your code to start getting benefits. These aspects help in understanding the AOP methodology and logistical issues. Then you can go ahead in an incremental fashion with the other advanced applications.
    On language-based AOP vs. others:
    I personally prefer language-based approach as in AspectJ. See Gregor Kiczales� post that says it much better:
    http://www.theserverside.com/home/thread.jsp?thread_id=18878#80549
    -Ramnivas
    [ September 16, 2003: Message edited by: Ramnivas Laddad ]
    [ September 16, 2003: Message edited by: Ramnivas Laddad ]
     
    Andre Tow
    Ranch Hand
    Posts: 158
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Ahh thanks for your answers, good stuff indeed. I think that I too prefer language based AOP I'm xml'd out these days and of course Gregor does too, he spent like 8 years writing AspectJ! heh.
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic