From: transfire@... Date: 2006-06-15T03:17:14+09:00 Subject: Re: Cut-based AOP Austin Ziegler wrote: > If it takes two years of studying to "get" AOP, then I definitely *do > not* need it. IOC is easier to understand than that, and I think that > it has more value in Ruby than what I've understood of AOP. > > AOP *may* be a revolution in programming, but *no one* has been able > to explain its real and immediate value to me in any way. I didn't do > OOP for years, but I *got* it very quickly when I was taught it. > > Here's the challenge. Let's accept, for the moment, that your RCR > represents the Right Way to do AOP in Ruby. Now, convince me that we > need your RCR. Sell me on AOP. Tell me what the benefits are -- *show* > me the benefits in code. Show me that my code will be shorter, easier > to understand, cleaner, more extensible, more secure, *whatever* with > AOP. Right now, if I want to give someone hooks into my code, I make > explicit plugin points. If I don't and someone wants to modify either > the input or output of my method, then they can either wrap me through > inheritance or composition. I really do *not* get the value that AOP > gives me, and the example given in the Python mailing list link you > gave me is clever, but I can't see *value* there. > > We've had a discussion recently. *Convince* me that AOP will make a > Ruby developer's life significantly better than what I have described > ("plugin points", inheritance/composition wrapping) as well-understood > and I'll support you. My problem isn't with your RCR; my problem is > with AOP. Right now, it's just a buzzword with little value. If it has > value, I am convinced that you can change my opinion. Ha ha! You're funny Austin. It took over 20 years for OOP to gain acceptance. 20 years! You expect me to do the same for AOP in a couple of mailing list posts? The success of OOP grew out hands on work with it's concepts. The success, or failure, of AOP will only come about in the same way. Of course if we never have good tools for working with AOP how will we ever know? While everyone's busy bashing AOP, other people are trying to see what *orthoginal design* can do. It would be nice if we could use Ruby to do the same and with a solid foundation like cuts (which again would be an optional library). But to play along a bit you might be interested to know that the whole reason I got into AOP is because I started doing AOP before I even knew what is was or that the concepts were already out there. Perhaps you recall GUtopIa? Well, that was a GUI framework I wanted to build for Ruby. The way I wanted it to work required method-wrapping entire classes! After some nasty meta-coding that would make most people's eyes pop out, I started to thinking I needed some kind framework, and lo, I discovered the concepts were already out there in AOP. I put GUtopIa on the back burner and decided to pursue AOP for Ruby with the ultimate hope of returning to GUtopIa when good AOP support was in hand. That's how the Cut-based AOP RCR got developed. It wasn't just an abstraction pulled out of the thin air. Thankfully I met Peter Vanbroekhoven, an monumentally capable coder, and together we spent nearly two years studying AOP concepts and hammering out possibilites. What we ended up with, while perhaps not perfect (is anything ever perfect?) is a clean foundational system that supports all the requirements of AOP without forcing anyone into a specialized high-level way of doing things --you are free to abtract to top of it as *you* see fit. Seems like a good deal to me. T.