Wow, you managed to say "monkeypatch" three times in two sentences ;)

I guess, a distinction might help.

Most Rails plugins target the framework as a tool to build  
applications. E.g. all acts_as_* plugins live on this level. But the  
same strategy of "let people work out solutions in plugin land" that  
has been so wildly successful for Rails has been adopted to  
applications like Mephisto. As such there are plugins that don't  
target Rails itself but specific applications. And the same success  
story continues to work on this level, too.

I totally agree that for framework level plugins it makes sense to  
alter ActionController::Base. But that doesn't apply to plugins that  
target an application.

Examples for this usecase are additions to Mephisto like pagination of  
article lists, custom spam protection mechanisms, additional archives  
and stuff like that (i.e. features that are intentionally left out of  
Mephisto and pushed into Mephisto plugin land). These need to amend  
MephistoController and can't be done just working on  
ActionController::Base. The same thing applies to many application  
level controller plugins.


Am 17.01.2008 um 21:45 schrieb Pratik:

>
> Sevn,
>
> I'm not really satisfied with this use case. From plugins, you're much
> more likely to monkeypatch ActionController::Base and much more less
> likely to monkeypacth ApplicationController. In fact, if plugin is
> monkeypatching ActionController::Base, it's a lot easier to override
> it in ApplicationController. But again, I might be missing a point
> here. So please feel free to correct me !
>
> Thanks.
>
> On Jan 16, 12:33 pm, Sven Fuchs <[EMAIL PROTECTED]> wrote:
>> Am 16.01.2008 um 05:29 schrieb Michael Koziarski:
>>
>>> parent controller.  Consistency is great, but are there features  
>>> that
>>> are easier with this?
>>
>>> For example, are there any changes for plugin authors?   Does this
>>> make *something* they do any easier?
>>
>> This actually would make authoring plugins that "monkeypatch"
>> application controllers easier, yes.
>>
>> Right now one has to jump through hoops to do that (and, above all,
>> know which ones and how).
>>
>> "monkeypatch" in quotes as this is a recommended (and successfull)
>> practice for quite some apps out there.
>>
>> So, yes, there's a real benefit.
>>
>> --
>> sven fuchs                      [EMAIL PROTECTED]
>> artweb design          http://www.artweb-design.de
>> grünberger 65          + 49 (0) 30 - 47 98 69 96 (phone)
>> d-10245 berlin          + 49 (0) 171 - 35 20 38 4 (mobile)
> >

--
sven fuchs                      [EMAIL PROTECTED]
artweb design           http://www.artweb-design.de
grünberger 65           + 49 (0) 30 - 47 98 69 96 (phone)
d-10245 berlin          + 49 (0) 171 - 35 20 38 4 (mobile)




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to