• 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 for Complex Projects

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ramnivas,
Welcome to JavaRanch! Thanks for contributing.
I am curious re. level of complexity of software development projects you have been involved in where AspectJ is used heavily (say in terms of # of classes, kind of projects, etc.). Could you comment on what penalty (if any) do you pay for using aspects in your projects? I can see clearly the benefit of separation of concerns, especially for orthogonal horizontal concerns that span a number of separate modules, yet we all know there is no such thing as a free lunch!
-Jorge
 
Author
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jorge.
I have used AspectJ on projects involving a few 1000 classes. I am also aware of several projects of a similar complexity that used AspectJ quite successfully. The class of applications range from J2SE-based to J2EE-based projects.
One cost of using AspectJ is increased compilation time, especially when you change just a class or two. However, there are a few ways to counter this issue. The first technique is to break the project into multiple subprojects. This way the compilation can be limited to the subprojects that have been modified. Second technique is to use the incremental compilation mode available in AspectJ 1.1.
Last week, the AspectJ team reported a significant improvement in compilation speed (by factor of almost 8 in certain cases) by adding a few simple optimization (these optimizations will be a part of 1.1.1 release due soon). With AspectJ 1.1 being stabilized, the focus is shifting to adding more aggressive optimizations. Soon, compilation time will not be a real issue.
In the final analysis, the cost of increased compilation time is minuscule compared to the clarity, consistency, and ease of evolution added by an AspectJ-based solution. The time saved by manual coding that will be needed in traditional solution is also significant.
-Ramnivas
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does AspectJ have any limitations? Any places where it should not be used?
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has AspectJ been integrated with any of the various frameworks out there? I'll target my question specifically to persistence frameworks, ala Hibernate, Cayenne, or OJB, as that's where I have a particular need at the moment.
 
Ramnivas Laddad
Author
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pradeep,
You can use AspectJ wherever you see crosscutting concerns in Java (and that is pretty much every project!). That said, in certain environment, particularly J2ME, AspectJ may not work out of the box.
Tina,
AspectJ is integrated with BEA Weblogic (see http://dev2dev.bea.com/resourcelibrary/utilitiestools/monitoring.jsp). However, on most cases, you can use AspectJ without such integration.
-Ramnivas
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ramnivas,
Your weblogic URL does not seem to work because of some extra character at the end of the URL.
Here is URL again
http://dev2dev.bea.com/resourcelibrary/utilitiestools/monitoring.jsp
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RamNivas,
What about JBoss?
 
Ramnivas Laddad
Author
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pradeep,
Unlike Weblogic, AspectJ is not integrated with JBoss. Note that JBoss features an AOP implementation of its own (in JBoss 4.0).
-Ramnivas
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is that a competitor to AspectJ?
 
Ramnivas Laddad
Author
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pradeep Bhat:

Is that a competitor to AspectJ?


It seems so.
One clarification: The lack of AspectJ integration with JBoss does not preclude one from using AspectJ with JBoss.
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well its not a standalone AOP impl it is tied into their container infrastructure ASFAIK so its not *really* a competitor to a standalone AOP system like aspectj,aspectwerkz and nanning.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic