Was asking James the question: is Eclipse's implementation
"sufficiently powerful" for him.
First and foremost, this is only sufficient if you plan to do all of
your development in Eclipse with the IDE support for AspectJ enabled.
That's what I was asking, thanks.
Pity the fool who uses JCreator. Incidentally, I do develop pretty much
all of my code in Eclipse, except that about a year ago I had to make
some changes to a production system via a telnet window with vi while I
was about 100 miles from my laptop.
You wouldn't restrict your development to some extreme lowest common
denominator, i.e. telnet, would you? I mean even so, in that extreme
case you'd make the fix, racking your brain with limited visibility,
and then go back to your laptop as soon as possible and check
everything out. I guess I'm not following. You acknowledge that
Eclipse IDE with AspectJ enabled is sufficient if you do all your
development in Eclipse, which you do. Yet you still don't want to reap
the benefits of AOP.
More to the point, the problems with AOP (outside of using annotations)
I have to admit I haven't yet gotten to the part in my reasearch where
AOP using annotations is an improvement so please bare with me. And I
take your word for it.
represent a flaw in the way the language is used. It is an abuse of the
language.
Yes, peeling a layer of skin off of encapsulation, but in a controlled
way. Coding "cross-cutting concerns" into each affected class is an
abuse of OOP that creates maintenance problems. Lets say you did, code
a cross-cutting concern into, say, 35 different classes pretty much all
the same code woven into those classes where appropriate. You already
used your inheritance card on another concept related to core
functions. And another developer comes in and has to code a new
requirement into the cross-cutting concern. How does he recognize:
1) that the concern is cross-cutting.
2) which code woven into the classes involves the concern without
disturbing the core functionality of the class
3) which classes have the concern's code woven in (how does he know he
got them all)
Or needs to code a new requirement into the core functionality of the
class how do you ensure:
4) he does not diverge the cross-cutting code so that it is less
recognizable than in the 34 other classes?
5) over time with maintenance (new requirements etc.) all of the
cross-cutting code in all 35 classes do not diverge and becomes
unrecognizable as related.
6) over time all of the cross-cutting code behaves the same way.
Do you feel that the above error prone process is the lesser of the
evils here?
Even if it's possible to make it work by detecting the bugs a
little earlier (which is essentially what an IDE plugin does), it's
still bad programming.
Even meeting all of your requirements it's still bad? IMHO bad code is
the result of some combination of laziness, lack of skill, over
engineering and showing off. How is the intentional use of a tool that
provides real, recognizable benefits, for some trade-offs of course,
bad programming? I asked in so many words in a prior post: Why are
these trade-offs not worth the benefits?
This kind of thing may have been necessary until
annotations were added to the language... but it's now completely
unnecessary.
I am waiting for the moment when that becomes more widespread knowledge.
The result will be not only a safer way of accomplishing tasks like
transaction handling, but also a simpler and more elegant implementation
of aspect-oriented programming, because it will not be necessary to
match methods based on the name or the signature or something like that.
In the interim, it's possible to do this using AspectJ, and just
remaining careful about using the obsolete features that let you define
non-annotation based pointcuts.
Why do you need to wait for others to know what you know? If the tools
already (seem to) support what you would like them do what's stopping
you from using them? Are you talking about your peers in your
organization? If so, are they using Eclipse as well, can you bring
them up to speed and catch unapproved techniques in peer reviews?
Thanks for the dialog, it is thought provoking.