Wikidata/Berlin summit 2012/ContentHandler
An overview of the ContentHandler facility, discussion of some blurry edges and nasty bits. https://meta.wikimedia.org/wiki/Wikidata/Notes/ContentHandler
by Daniel K.
- Content on wikipage: wikitext; some pages recognized by MediaWiki for JS, CSS, but otherwise it expects wikitext
- store structured data in json
- task: teach mediawiki to store diff types of content
- content handling by 2 base classes:
- 1. content handler (specific types of content, able to deserialize a block into an approp. content type)
- wikitext: content = string
- (what's the second base class?? ;)
- c.h. knows what actions to perform with content types (e.g. merging diff. versions of content, undo function)
secondary data: link tables (like iwlinks, etc.) updated when a page is added, removed when the page is deleted
deletion updates: abstracted into updateObjects
Any page edit event r page deleted event should be implemented with updateObjects
Backwards compatibility: getText function will always work for text, for non-text: "null" Migration should work without updating ALL the code at once.
Q. For review, what should we focus on? A. Foundations are laid in code, but so far this is all. (Some unit tests exist.) Edit page code *will* be important but not yet. Comment: better to fix bugs because they are carried further... A. ... default content handler (?) is per name space ...