[aosd-discuss] AOP and Modern OO approaches
vamsidhar sharma
bvamsidhar at yahoo.com
Tue May 15 08:33:51 EDT 2007
Thanks Dean. That clarifies the message. I wasn't focusing on something that can be done at parsed representation level of readable code. So was wondering about what fine-grained is if OO methods are coarse-grained.
Was experimenting with phpAscpect. AOP tool for PHP that applies xslt transformations on the parse tree for a php program. Feel that such modification is fine-grained and provides more flexibility regarding where in the program an aspect can give advice.
Very sorry for wrong attribution of an informative article.
Regards,
Vamsi
----- Original Message ----
From: Dean Wampler <dean at aspectprogramming.com>
To: vamsidhar sharma <bvamsidhar at yahoo.com>
Cc: Dean Wampler <dean at aspectprogramming.com>; discuss at aosd.net
Sent: Wednesday, May 9, 2007 6:37:10 PM
Subject: Re: [aosd-discuss] AOP and Modern OO approaches
Since I wrote the presentation, perhaps I should field the question ;)
All I meant by this statement is that AOP expands the options for
changing program behavior at the level of the class, individual
objects, and even individual methods and fields in an object. The OO
mechanisms you mention take you most of the way and they are great
when you can choose which subclasses to define and instantiate. Then
you can override methods as needed to change the behavior locally.
You don't always have that freedom in some real-world systems, so
it's nice to have tools with sophisticated "join point models" that
let you reach into existing classes and objects and modify their
behavior, even dynamically. The better AOP tools let you specify
conditions for when this behavior should occur. For example, you can
say that "new behavior" N should only be added to a particular method
M if it is being called in the context of another method M1 and data
D has a particular value, etc., etc.
However, the important point isn't that you have more fine-grained
control over the objects in the system. Rather, the important point
of AOP is that you can specify in one place (a "module") the state
and behaviors you want that are shared among an arbitrary number of
classes and objects that might not have any other relationship.
Perhaps it's a paradox that modularizing these global, cross-cutting
behaviors requires very fine-grained control.
Hope this helps.
Dean
On May 9, 2007, at 5:55 AM, vamsidhar sharma wrote:
> While understanding AOP I found this article by Robert Martin
>
> http://objectmentor.com/resources/articles/AOP_in_Ruby.pdf
>
> In this the author says that modern OO desgin approaches like
> inheritance, design patterns, Inversion of control containers etc.
> work at a coarse grained level of interaction..
>
> Can anyone clarify what that means.. the coarse-grained level?
>
> Thanks
> Vamsi
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> _______________________________________________
> discuss mailing list - discuss at aosd.net
>
> To unsubscribe and change options, go to:
> http://aosd.net/mailman/listinfo/discuss_aosd.net
>
> Check out the AOSD.net Wiki: http://aosd.net/wiki
Dean Wampler, Ph.D.
dean at objectmentor.com
http://www.objectmentor.com
http://www.aspectprogramming.com
http://www.contract4j.org
I want my tombstone to say:
Unknown Application Error in Dean Wampler.exe.
Application Terminated.
[Okay] [Cancel]
____________________________________________________________________________________Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469
More information about the discuss
mailing list