AOP Java its implications

T

Tomer Ben-David

Hi

I like the idea of AOP. Used aspectJ abit and I have these doubts, as
I create the different aspects for example, security, logging etc,
then I find out that:

1. Debug Issues - When I want to debug the application I need to
compile it without the aspects, because the aspectj is chaning the
..class files.

2. Code readability - I want to look at a method and to know what its
doing, I'm not able to, because the aspectj is chaning that method, so
what if someone else is comming and watching the code, instead of
looking at one method, he will need to look at this method and at all
the related aspects.

3. Bug prone issue - aspectj is creating join points using regular
expression like expressions. isnt thta bug / error prone? enough that
something you didnt want to be updated by the aspect is answering the
regular expression you defined to the join point, and boom, the
application will behave in an unwanted manner...

Any comments on my comments?

Thanks...
 
A

analogueboy

You can still use Java remote debugging to connect to the JVM and capture
data at the break-points. You might also consider using a different
framework like Aspectwerkz or Nanning that work with normal Java classes and
XML files.

Have a look at the Introduction to AOP article on onjava for a gentle intro
to AOP using aspectwerkz.

Regarding the regexp matching, the frameworks that i have seen in the past
all seem to use this method, the biggest disadvantage is when you refactor
your package strutcture you'll have to recreate your aspect definitions too,
there is obviously the potential for both to become out of sync.

Generally AOP is one of the most useful developments recently, but I'd like
see a framework that uses objectweb's Asm library rather than BCEL as it is
smaller and quicker (Beanshell uses Asm and it rips).

HTH

AB
 
D

Dale King

Tomer Ben-David said:
Hello? has anyone got any views on this issue?

(e-mail address removed) (Tomer Ben-David) wrote in message


I haven't studied it in great detail, just familiarized myself with it and
it makes me kind of uneasy as well. It all seems like a big hack to me about
like the C preprocess (maybe even worse). But I can't decide if that is a
justifiable attitude of if it is just because I am stuck in my current
mindset.

It seems to me as well that you are creating write-only code. How do you
maintain something where the functionality is so distributed. I think that
it can be useful, but I think something needs to be done so that it is
easier to follow.

I think the field is still maturing as well. I'm keeping an open mind.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top