2011/4/4 MZMcBride z@mzmcbride.com:
Brion Vibber wrote:
I'm not a real MediaWiki developer, so it may be a silly question: How hard it is to convert a gadget into an extension? If it's not too hard, wouldn't it be better to redo useful gadgets as extensions? Unless i miss something very basic, this will make them easier to maintain, install, update and localize.
In principle, making an extension based on an existing Gadget should be pretty straightforward, especially with ResourceLoader taking care of more of the details of JS & CSS fetching.
Might be fun to whip up a how-to guide and post it on the tech blog...
That seems like a bit of a regression, though. The Gadgets extension was implemented as a way for local admins to easily hook into Special:Preferences so that typical users could enable certain pieces of JavaScript without needing to edit any pages.
By creating separate extensions for individual JavaScript gadgets, you hit some interesting benefits/detriments:
Benefits:
- extensions can easily be enabled globally
- extensions have great localization support
- extensions have sane review processes in place
- extensions can implement functionality when JavaScript isn't available
Detriments:
- extensions usually take one forever to get enabled (this is a huge point)
The benefit of great localization support is also a huge point, and hugely positive. It's worth the resources to fix the hard, long and frustrating review processes that cause extensions to wait for years in the line to be enabled to get the benefit of localization. It's true that extensions take forever to get enabled, and this is, indeed, a huge point - and it must be fixed. I suppose that it requires resources; well, the Foundation must prioritize this much-needed evolutionary change higher than big revolutionary projects. It's not even a matter of "globalization", "language equality" etc. - it's something that's just plain useful for the Big English Wikipedia, too.
-- Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי http://aharoni.wordpress.com "We're living in pieces, I want to live in peace." - T. Moore