Re: can you have interception w/o aop?

"Eric Bodden" <[email protected]>
Newsgroups gmane.comp.programming.aspect.general
Message-ID <F3EB3B98C34E94498F1110B618E3717D40F073@EXCHANGE2VS4.campus.mcgill.ca>
Hi Roger.

Depends on whether with whatever technique you choose you achive to
implement the crosscut in a modular way, I would say.

> if we make a static factory that subclasses and inject 
> logging code into every method or specific named methods , is 
> it still aop or just interception?

Well, this would involve _copying_ all the methods on the superclass(es)
and tweaking them in such a way that they do logging, right? (Or I got
your proposal wrong.) Well, copying code can certainly not be seen as a
way of implementing crosscutting features in a modular way because in
your subclass the code would still be excessivly scattered. You would
not have gained anything.
  
> if you inject logging code and say "hey i can inject this in 
> whatever i want and i think that my logger is an aspect" 
> would that be considered aop?

See again above - does not depend on the way how you inject it but what
you achive, really.

> and when is a pointcut a pointcut?
> if i express it as dsl , or if i express it as static c# "if 
> (method.Name.StartsWith("set_")" , is that a pointcut?

I would say that the following definition is reasonably precise: "A
pointcut is a predicate over the statis structure or dynamic behavior of
a program." Again, this does not depend on the way how you define this
predicate at all.

At the DOAL workshop at AOSD this year we had a discussion about
"library based approaches" to AOP vs. approaches facilitating "language
extensions". Gergor raised the (IMHO valid) point that any library can
in fact also be seen as a special constraint way of a language
extension, because in fatc it also comes with its own syntax (even
though within certain constraints of a base language) and semantics. So
from this point of view, the notion of an aspect/pointcut/advice is
really language independent.

Eric

--
Eric Bodden
Sable Research Group, McGill University
Montreal, Canada 

__________________________________________________
AOSD Discuss mailing list    -    [email protected]
To unsubscribe go to http://aosd.net

Check out the AOSD.net Wiki: http://aosd.net/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.