[Mediawiki-l] Cutting MediaWiki loose from wikitext

Daniel Kinzler daniel at brightbyte.de
Mon Mar 26 14:45:51 UTC 2012


Hi all. I have a bold proposal (read: evil plan).

To put it briefly: I want to remove the assumption that MediaWiki pages contain
always wikitext. Instead, I propose a pluggable handler system for different
types of content, similar to what we have for file uploads. So, I propose to
associate a "content model" identifier with each page, and have handlers for
each model that provide serialization, rendering, an editor, etc.

The background is that the Wikidata project needs a way to store structured data
(JSON) on wiki pages instead of wikitext. Having a pluggable system would solve
that problem along with several others, like doing away with the special cases
for JS/CSS, the ability to maintain categories etc separate from body text,
manage Gadgets sanely on a wiki page, or several other things (see the link below).

I have described my plans in more detail on meta:

  http://meta.wikimedia.org/wiki/Wikidata/Notes/ContentHandler

A very rough prototype is in a dev branch here:

  http://svn.wikimedia.org/svnroot/mediawiki/branches/Wikidata/phase3/

Please let me know what you think (here on the list, preferably, not on the talk
page there, at least for now).

Note that we *definitely* need this ability for Wikidata. We could do it
differently, but I think this would be the cleanest solution, and would have a
lot of mid- and long term benefits, even if it's a short term pain. I'm
presenting my plan here to find out if I'm on the right track, and whether it is
feasible to put this on the road map for 1.20. It would be my (and the Wikidata
team's) priority to implement this and see it through before Wikimania. I'm
convinced we have the manpower to get it done.

Cheers,
Daniel



More information about the MediaWiki-l mailing list