Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AOP vs OOP

 
Fidel Edwards
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 !
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Better" than what? What did you miss in the explanations you found?
 
Fidel Edwards
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic