Submissions/ResourceLoader 2: The Future of Gadgets

This is an accepted submission for Wikimania 2012.

Submission no.

617

Title of the submission
ResourceLoader 2: The Future of Gadgets
Type of submission (workshop, tutorial, panel, presentation)
Presentation
Author of the submission
Roan Kattouw and Timo Tijhof
E-mail address
rkattouw@wikimedia.org , ttijhof@wikimedia.org
Username
User:Catrope, User:Krinkle
Country of origin
The Netherlands
Affiliation, if any (organization, company etc.)
Wikimedia Foundation
Personal homepage or blog
Abstract (at least 300 words to describe your proposal)

In 2007, support for Gadgets was introduced to Wikimedia Foundation wikis. Gadgets are small JavaScript-powered interface enhancements written and managed entirely by users on the wiki: the code is written and maintained on wiki pages, Gadgets are managed on the wiki by administrators and each user can pick their own set of Gadgets to enable. This functionality was originally added to empower users and allow them to improve the wiki without assistance from developers or system administrators. And it worked: many Gadgets have been written in the past five years, and a number of them are generally useful and are popular on dozens of wikis.

However, the infrastructure that supports Gadgets has not changed much since 2007, and a number of problems in the current system have surfaced over time. Managing Gadgets can only be done by administrators and requires mastery of a definition "language" that is like wikitext, but worse. Popular Gadgets must be installed on each wiki separately, which leads to a lot of duplication and subtle differences between versions of the same Gadget on different wikis. A number of popular Gadgets have now been centralized on Meta, but this has to be done using improvized hacks. Furthermore, translating Gadgets is not supported well either.

Roan and Timo have rewritten the Gadgets infrastructure from the ground up. In this rewrite, Gadgets are treated as first-class citizens and have access to all the same ResourceLoader functionality that JavaScript code in MediaWiki core and extensions can use. With improved dependency management, Gadgets can register dependencies on other Gadgets in addition to core modules, which means shared libraries of user-written code can be hosted in the Gadgets system. Gadgets also have access to native internationalization support, and can use existing translated messages in MediaWiki and create their own messages that can be translated on the wiki. Additionally, new features were added to ResoureLoader which allow for Gadgets to be shared between wikis. This makes it possible to create a central repository for Gadgets, much like Commons serves as a central repository for media. Finally, the rewrite includes an improved interface for managing Gadgets.

This presentation will not be very technical, but will focus on the problems with the existing system and what we did to solve them in our rewrite.

Track
Technology and Infrastructure
Length of presentation/talk
25 minutes
Will you attend Wikimania if your submission is not accepted?
Yes (Roan), No (Timo)
Slides or further information (optional)
Special request as to time of presentations

Interested attendees

If you are interested in attending this session, please sign with your username below. This will help reviewers to decide which sessions are of high interest. Sign with four tildes. (~~~~).

  1. Yaron Koren (talk) 17:11, 9 March 2012 (UTC)[reply]
  2. Marclaporte (talk) 05:56, 11 March 2012 (UTC)[reply]
  3. Nikerabbit (talk) 08:30, 13 March 2012 (UTC)[reply]
  4. Amir E. Aharoni (talk)
  5. Daniel Mietchen - WiR/OS (talk) 23:09, 18 March 2012 (UTC)[reply]
  6. Logicwiki (talk) 07:39, 22 March 2012 (UTC)[reply]
  7. Add your username here.