aspose file tools*
The moose likes Agile and Other Processes and the fly likes AOP vs OOP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Agile and Other Processes
Bookmark "AOP vs OOP" Watch "AOP vs OOP" New topic
Author

AOP vs OOP

Fidel Edwards
Ranch Hand

Joined: Mar 19, 2008
Posts: 231
Hi Members,


Can anyone give me better explanation between Aspect Oriented Programming (AOP) and Object Oriented Programming (OOP). I googled it but couldn't get better explanation. Also want to know how Spring or (Struts) use AOP ?


Thanks in Advance !


God Gave Me Nothing I Wanted, He Gave Me Everything I Needed.
OCPJP6
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Reading something like the Wikipedia entries for both should give you more than enough information to differentiate the two.

Spring uses AOP for its transaction management. Struts doesn't use it at all, unless the developer uses it to do something--you can use AOP *with* Struts, but it provides no mechanism for doing so. Implementing AOP is *completely* outside of the problem Struts tries to solve.

Consider, however, a web request filter (a servlet spec filter, a Struts 2 interceptor, etc.). The developer has access to the request--so filters (or interceptors) are "around" advices for a web request. It's (limited) AOP in nature, applied to a higher-level construct than a method.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
"Better" than what? What did you miss in the explanations you found?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Fidel Edwards
Ranch Hand

Joined: Mar 19, 2008
Posts: 231
Ilja Preuss wrote:"Better" than what? What did you miss in the explanations you found?


Thanks Newton for instant reply !

Ilja, I want something in depiction or better example either from daily life or in Simple programming that can help me in better understanding !

Meanwhile, I am following the Mr. Newton
David Newton wrote: Reading something like the Wikipedia entries for both should give you more than enough information to differentiate the two.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AOP vs OOP