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.
 * I don't think we can make this statement anymore - Relying on PHP was probably not the best choice for performance, since it has not benefited from improvements that some other dynamic languages have seen. PHP7.0 offered a lot of websites massive gains in performance.
 * Another extension, called "Narayam", provides additional input methods and key mapping features for non-ASCII characters. - Extension has been renamed to Universal Language Selector.

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 that 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
 * Thanks. I've tweaked the text to reflect this. guillom 19:40, 14 November 2011 (UTC)
 * 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"
 * Thanks. I've removed that paragraph as the editors suggested. guillom 19:40, 14 November 2011 (UTC)
 * 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.""
 * Thanks; added. guillom 19:40, 14 November 2011 (UTC)
 * 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.."
 * Thanks. I'll add a note about this. I'd love to know more about why it's difficult to build new skins, though. Someone suggested User:Dantman would know. guillom 19:40, 14 November 2011 (UTC)
 * Dantman 14 Nov: If the author was talking about the piles of boilerplate that make it hard to make a skin... then that's gone... if you are thinking of a 1.18 context rather than a stable context... If the author was talking about the way we build skins with classes rather than normal templates, then that's still around. finlay: my experience browsing wikis with custom skins: they never upgrade for fear their custom skin breaks. thedj agreed.
 * Re: user permissions, robla said 14 Nov, depends on what they mean by "hierarchical". it's relatively flat, but you can at least add users to groups, and then give groups capabilities; it's not RBAC. finlay:  I would say it's flat from my experience. (although I may not be the intended answerer) since it's perm['group']['permissionkey'] = true; so permissionkey is 'flat' and group is just the recipient

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.


 * Provides good background info . Thanks! abi 07:00, 15 March 2019 (UTC)


 * Very well put and provides a lot of clarity to start with. Thanks! dytrivedi 09:45, 19 November 2011 (UTC)


 * I for one found it fascinating. Great work! Graham87 06:25, 14 November 2011 (UTC)
 * Glad to head it! Thank you. guillom 19:40, 14 November 2011 (UTC)


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

Globals are nasty. Mmmmkay?
^

We should probably have something about this...

Reedy 22:43, 13 November 2011 (UTC)


 * Mentioned in the config paragraph. guillom 19:40, 14 November 2011 (UTC)