Aspect oriented Everything?

I’m not a particularly experienced Ruby user. I have to do most of my work
in Java. It’s certainly possible that AOP is more necessary in Java than
Ruby.

However, let’s talk about the use of AOP in Ruby. Suppose you implement an
aspect as a mixin and then mix that into many classes. Another application
may want to reuse those classes but they may want a different implementation
of the mixin. That will require overridding the mixin methods which seems
cumbersome.

···

-----Original Message-----
From: Ben Giddings [mailto:ben@thingmagic.com]
Sent: Monday, August 25, 2003 10:18 AM
To: ruby-talk@ruby-lang.org
Subject: Re: Aspect oriented Everything?

Volkmann, Mark wrote:

When AOP is not used there are basically two choices for implementing
functionality like logging, caching, persistence and other so called
crosscutting concerns. You can implement them in every class that needs
them or implement them in a common base class.

In Ruby, couldn’t you implement them in a mixin module?

Implementing them in a common base class also has the problem of
assuming that reusers want the same implementation. In addition, the
classes may not be related to each other in any way except for how they
wish to implement a given concern.

Again, this seems to call for a mixin to me.

I would also like to see a practical explanation of how AOP is useful,
and how it is better than mixins and stuff. The concept sounds
interesting, but I’ve never seen a convincing argument for it,
especially one that deals with the flaws.

The biggest problem I have with AOP is that it doesn’t often seem to
mesh well with the languages that it is applied to. What I saw of the
Ruby AspectR stuff is a prime example.

Ben


A.G. Edwards & Sons’ outgoing and incoming e-mails are electronically
archived and subject to review and/or disclosure to someone other
than the recipient.


Volkmann, Mark wrote:

However, let’s talk about the use of AOP in Ruby. Suppose you implement
an aspect as a mixin and then mix that into many classes. Another
application may want to reuse those classes but they may want a
different implementation of the mixin. That will require overridding
the mixin methods which seems cumbersome.

Ok, and what is the AOP alternative?

Like I said, I don’t know much about it, other than the brief glance
I’ve had at it. I’d like to see a fairly simple, but concrete example
of “here is a problem that needs solving, here’s how you’d solve it
without AOP, here’s how you’d solve it with AOP.”

My guess is that there are other people on the list who are similarly
interested, but if not, feel free to speak up and we could do this offline.

Ben