[aspectc-user] Re: Using Aspects

Sacher Sacher at dvoid.org
Fri Oct 25 21:18:43 CEST 2002

> I am still pretty new to AOP, so i still dont really get the concepts
> too well.
> But is it possible to use aspects while wrappers or frameworks sort of
> for GUI.
> Like right now you have an object Window, and you can do whatever you
> want with a window by using the methods of Window.
> Now how can aspects help in there?
> The only examples i have seen till now tell me about the use in things
> like logging. Yeah sure it is good to be able to log calls to each
> method by defining an aspect but i still havent seen any other real
> examples of it.
> Can anyone give me some nice examples to explain the concept and its use
> a bit more, without using too technical terms.
> OOP has some really good examples(OK , i agree it is pretty mature by
> now)  with real world objects like using a bulb, etc but i am yet to see
> such examples of AOP.

Dear Prashant!

I agree with Olaf, that you should start reading some general AOP-Papers.
[KiczEtAl97] is one of the first AOP-Papers.
Reading this one is a MUST if you like to understand AOP and it´s concepts
implementations, although you shouldn´t spend too much time
on the SCHEME-Examples...

Concerning your question:
Logging, Debugging, Tracing etc. are "non-functional requirements"
and as written in [KiczEtAl97], P.8:
"... Aspects tend not to be units of the system's functional decomposition,
but rather to be properties that affect the performance or semantics of
the components in systemic ways. ..."
So, these are common examples for applying AOP,
which are more or less easy to understand and implement.
But you can use AOP for functional requirements (or GUIs) as well.
Maybe, AspectJ is the better framwork to start AOP with.
AspectJ can be applied to *any* JAVA-Project.
Joinpoints, Reverse Inheritance and Introduction can help you on
every concern of your application.

Maybe, Kiczales´ and Hannemann´s "Design Patterns through AOP"
in [HannEtAl02] are a good place to examine the power of AOP as well.
I like the concept of applying Design-Patterns to your code afterwards
(btw: this can be reached with AspectC++ as well).



Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Videira Lopes, C.,
Loingtier, J.-M., and J. Irwin: Aspect-Oriented Programming.
Proc. ECOOP, Jun 1997.

Hannemann, J., and G. Kiczales: Design Pattern Implementation in Java and
Position Paper OOPSLA02

More information about the aspectc-user mailing list