I knew there was some AOP library for Ruby but hadn't looked at it. It looks like AspectR is rather limited, I think this is the control-flow feature I'd want in order to only do something in the context of a view, but it doesn't seem to have it:
"control-flow based crosscutting" Anyway, I'd be hesitant to recommend dumping something like this in a production app. Seems like it would have the possibility of being buggy and non-performant. Much of the stuff it does do you could probably design on your own with test coverage, and feel much more at ease. -- Chad On 4/23/07, Warner Onstine <[EMAIL PROTECTED]> wrote:
On Apr 23, 2007, at 6:58 PM, Chad Woolley wrote: > How "OO" is it? In Ruby, for better or for worse, everything is an > object. Even classes themselves are objects. This makes it possible > (if not prudent) to do pretty much anything. > > How does it support cross-cutting concerns? Lately, I have been > missing the ability to do Aspect-oriented programming in Ruby. For > example, I want to HTML-escape the return value of any model getter > which is in the call stack of a view. We ended up doing it manually, > for every field in every view. When I started rambling about how you > could do that sort of thing with 5 lines in AspectJ (and never have to > worry about forgetting it for future fields), I just got blank > stares... What about AspectR? Or metaprogramming? I'll be honest I haven't looked too much at Ruby's metaprogramming model, but the HigherOrderMessaging stuff I posted a while ago looked like it might be able to handle something like that. -warner > > -- Chad > > On 4/21/07, Warner Onstine <[EMAIL PROTECTED]> wrote: >> Hi all, >> I was just curious, when you start learning a new language, what do >> try and do first? >> >> Here are some of the ones that I look at: >> - looping (how do I do a for loop) >> - if, then, else >> - switches (do they exist?) >> - object and array creation (what types are there and how do I do it) >> >> In a sense this goes beyond just syntax and assumes that you (the >> developer) already have some knowledge of how to program and are >> familiar with OO. >> >> -warner >> >> Warner Onstine - Programmer/Author >> New book! Tapestry 101 available at http://sourcebeat.com/books/ >> tapestrylive.html >> [EMAIL PROTECTED] >> http://warneronstine.com/blog >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Warner Onstine - Programmer/Author New book! Tapestry 101 available at http://sourcebeat.com/books/ tapestrylive.html [EMAIL PROTECTED] http://warneronstine.com/blog --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
