On Wed, Oct 1, 2008 at 5:57 PM, Michael Klishin <[EMAIL PROTECTED] > wrote:
> > What if we start to collect some ideas for plugins development best > practices? > > One practice I figured out while trying to make ActiveSupport not to > break JSON gem > (don't use ActiveRecord unless you really really have to) is that > instead of monkey patching, > module inclusion should be used. > > Look at this gist: > http://gist.github.com/14051 > > If instead of mixing module in you'd use monkey patching, that spec > example is gonna fail. > > Any other ideas? > -- > MK > This is certainly a good one for most cases. But I think monkey patching also has it's place. I agree that module includsion should be done most of the time. One other thing I think should be limited is automagical inclusion. I'm guilty of doing this in the past and I'm trying to be consious of it so I can stop myself. A plugin should be very clear about what it does automatically, and if possible, it should rely on being explicity included to activate. There's a lot of smoke an mirrors and potentially frustrating bug chasing on those automagical inclusions. Just my 0.02 Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
