Manual talk:MediaWiki architecture

Feedback is welcome, and even encouraged. If you see that something's wrong, please fix it or report it below


 * Archive 1

Factual errors
Ideally, please fix the errors directly if you notice any. If you really don't want to, you can leave a note below.

Stuff that's missing
If you see that a major piece of information related to MediaWiki's architecture is missing from this document, please add it below. Ideally, you would add the content directly to the page, or at least provide pointers to where relevant information can be found.

Please do keep in mind, though, that we are limited to ±5000 words, and we're already way over the limit, so we can't go into too much detail, and we can't mention everything. Also, this document is specifically about MediaWiki's architecture, so it's normal that every single feature isn't included in it.

Content organization and major changes
If you'd like to suggest major refactoring or reorganization of content, please do so here before editing the page, to minimize disruption.



Review
If you've reviewed the whole document, or sections of it, please add your name below and say what you've reviewed. This will help identify what has been reviewed and what hasn't, to make sure the whole document is accurate.


 * From IRC 11 Nov, discussion with Chad, Brian, Jonathan, Gabriel, & Sam:
 * Re configuration variables: "Placing configuration variables in the global namespace is mostly a legacy from older versions of PHP" why? Not really, it was just a really really crappy design decision years ago. It has little to do with "old php versions". I would imagine "config as globals" was more "lazy programming" and "what worked at the time."  But that's well before my time. -- Chad
 * We should mention that we used to over-depend on globals; see the category of global object variables. Chad's joke: "Nowadays we don't use global objects, we use singletons so we can put our heads in the sand and pretend we don't use globals :)"  Jonathan suggests we use this material: Manual:Globals are evil
 * Wikipedia switched from CamelCase links to free links before MediaWiki was even created, so free links are the standard for internal links in MediaWiki. From the editors: did the switch have an impact on implementation (e.g., make the parser more complex, or make i18n harder)?  "MediaWiki was written in PHP4 originally, and there were classes in php4. They weren't as useful as php5+ classes, but they existed," says Chad.  Gabriel: "links aren't really the hard part of parsing... the impact is mostly cosmetic, although things like media links were probably easier to add with free links"
 * at the bottom of the caching section: "Add Constant database (cdb) for i18n messages, been using this for interwiki cache for ages" Chad says: "CDB files are just files with key -> value pairs. And they're way faster than db access or memcache.""
 * Regarding the difficulty with regard to skins: Gabriel: "MonoBook was quite hard to modify because it pushed the CSS support of the browsers at the time really hard. Behind the scenes every version of IE had different css. took ~1 month to do the skin for FF and Opera, then a few months to fix it up for the various IE versions -- all down to IE5/mac.. so if you wanted to move something, you'd have to fix up the css for all the browsers too. now that those browsers are dead, things are easier.."

Has this page been useful to you?
If you've learned something new about MediaWiki's architecture while reading this document, please leave a message here. It's really difficult to assess the impact and usefulness of projects like writing this document, so any feedback is appreciated. It'll help determine if similar projects should be attempted in the future.

Other comments

 * ça se lit comme un roman ! GJ --Ofol 23:50, 11 November 2011 (UTC)