[aosd-discuss] AOP and Modern OO approaches
Dean Wampler
dean at aspectprogramming.com
Wed May 9 09:07:10 EDT 2007
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]
More information about the discuss
mailing list