Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: "Humane Pointcut Languages" [Was: Re: [aspectj-users] AW:Pointcuton a constructor with a custom @Annotation]

On 4/27/06, Jonas Bonér <jonas@xxxxxxxxxxxxxxxxxx> wrote:
I think Dean captures an important problem when he writes: "it bothers
me that we discuss high-level concerns, say for example security, then
turn around and write PCDs using very low-level primitives that tend
to reference specific classes, methods, etc."

By the way, I should have added the word "only": "... using only very
low-level..." We'll always need those low-level primitives!

But I can't see why a more verbose, java like syntax would be more
"humane", and it for sure does not address the above stated problem.

You're right that I mixed two problems, general understandability and
appropriate levels of abstraction. I started with the easier problem,
understandability; what would be easier to read and therefore more
"humane"?

I strongly believe that the only thing that helps is to raise the
abstraction level above implementation details and rely on metadata.

(A plus would of course be to have an optional simplified syntax that
supports that directly, but with a goal to be more concise not
verbose.)

See my post http://jonasboner.com/2006/04/24/domain-driven-pointcut-design/,
where I actually discussing another issue, but that is closely related
to what I think is the main problem with having the wrong abstraction
level.

/Jonas

You make several great points in this blog. Contract4J only works
because its pointcuts use the principles you outline in your blog;
reliance on metadata annotations and avoidance of specific details of
class names, etc.

I think the next major step for us is to further develop the concept
of interfaces in AOD, which will take us beyond the limitations of
what metadata annotations can provide, while still allowing us to
exploit the wonderful power of PCD languages like AspectJ's, without
some of the drawbacks.

Finally, I would like to emphasize a point that doesn't get enough
attention IMHO. The problems we're facing with pointcuts are really
examples of well-understood OOD principles. The fragile nature of
pointcuts that refer to specific details is an example of breaking the
Dependency Inversion Principle (DIP) and the Stable Dependencies
Principle (SDP), as described by Robert Martin
(objectmentor.com/resources/articles/dip.pdf and
objectmentor.com/resources/articles/stability.pdf).

Dean
http://www.aspectprogramming.com
http://www.newaspects.com
http://www.contract4j.org


Back to the top