Changes
m
{{h:h|system admin toc}}
{{h:h|system admin toc}}
Because the documentation in the source tree is sparse and the code is scary, here's some info for new developers on generally how the [[MediaWiki]] software works.
The '''database''' (see also [[database layout]]) contains the [[Help:Filling the page|wikitext]] of the pages and various auxiliary information about pages, users, etc. It also contains all previous versions of all pages, as the MediaWiki software maintains its own version control system. The growing database size for Wikipedia's largest languages is shown [http://en.wikipedia.org/wikistats/EN/PlotDatabaseSize1.png here] and database dumps (not including user passwords) can be downloaded [http://download.wikimedia.org/ here]. As of February 2005, the current revision of all pages of the English Wikipedia holds 3 GB data and 500 MB index (download as 500 MB compressed dump) while the full database holds 80 GB data and 3 GB index (download as 29 GB compressed dump).
When '''viewing''' a page the wikitext is converted to [[w:XHTML|XHTML]] (see also [[m:XHTML]]), or this XHTML code is taken from cache, and sent to the user, whose browser renders the XHTML.
The XHTML code for a given page depends on:
*the mode, such as viewing or editing (see below).
*the wikitext
*the [[Help:Template|template]]s referred to
*the values of [[Help:Variable|variable]]s
*the existence of internally linked pages (gives view or edit link)
*the skin
*the user name itself
*the status of the user (more links if a sysop, etc.)
*the [[Help:Namespace|namespace]] (determines the link to the Talk page, or in the case of a Talk page, the page concerned)
*whether the page is watched by the user (gives watch or unwatch link)
*whether the user's Talk page has been recently edited (gives a message)
The result the user sees on the screen depends on:
*the XHTML code
*files referred to by the XHTML code, such as embedded images and a server-side css file.
*the browser and browser settings, including possibly a local css file, and the screen resolution.
When the user presses the '''Edit button,''' the wikitext itself is sent to them, of the whole page or of one section only. When the user presses '''Preview,''' their new version of the wikitext is sent to the server, which sends the corresponding new version of the XHTML code, which is rendered again and displayed above or below the user's new version of the wikitext (which the server has also returned). After possibly more changes and more previews, the user presses '''Save,''' sending their "final" version to the server, which now records the edit and sends the XHTML of the new version (again). In some cases also an [[Help:Automatic conversion of wikitext|automatic conversion of wikitext]] takes place in this stage.
See also [[Help:Downloading pages#Downloading_a_MediaWiki_page|Differences between wikitext and the webpage]].
==General Architecture==
{| border="1" cellpadding="6" cellspacing=0
|+ '''General Architecture'''
! User Layer
| align=center|[[Wikipedians|Web Clients]]
|-
!Network Layer
| align=center|[[Apache config|Apache Webserver]]
|-
! Logic Layer
|
{| border="1" align=center width="100%" cellpadding="2" cellspacing=0
| align=center|[[MediaWiki code layout|MediaWiki's PHP scripts]]
|-
| align=center|[[PHP config|PHP]]
|}
|-
! Data Layer
|
{| border="1" align=center width="100%" cellpadding="2" cellspacing=0
|[[MediaWiki file usage|File System]]
|[[Database layout|MySQL Database]]
|[[memcached|Caching System]]
|}
|}
See also: [[How to become a MediaWiki hacker]]
For Wikimedia, see also [[Wikimedia servers]].
Next: [[Database layout]] >
Because the documentation in the source tree is sparse and the code is scary, here's some info for new developers on generally how the [[MediaWiki]] software works.
The '''database''' (see also [[database layout]]) contains the [[Help:Filling the page|wikitext]] of the pages and various auxiliary information about pages, users, etc. It also contains all previous versions of all pages, as the MediaWiki software maintains its own version control system. The growing database size for Wikipedia's largest languages is shown [http://en.wikipedia.org/wikistats/EN/PlotDatabaseSize1.png here] and database dumps (not including user passwords) can be downloaded [http://download.wikimedia.org/ here]. As of February 2005, the current revision of all pages of the English Wikipedia holds 3 GB data and 500 MB index (download as 500 MB compressed dump) while the full database holds 80 GB data and 3 GB index (download as 29 GB compressed dump).
When '''viewing''' a page the wikitext is converted to [[w:XHTML|XHTML]] (see also [[m:XHTML]]), or this XHTML code is taken from cache, and sent to the user, whose browser renders the XHTML.
The XHTML code for a given page depends on:
*the mode, such as viewing or editing (see below).
*the wikitext
*the [[Help:Template|template]]s referred to
*the values of [[Help:Variable|variable]]s
*the existence of internally linked pages (gives view or edit link)
*the skin
*the user name itself
*the status of the user (more links if a sysop, etc.)
*the [[Help:Namespace|namespace]] (determines the link to the Talk page, or in the case of a Talk page, the page concerned)
*whether the page is watched by the user (gives watch or unwatch link)
*whether the user's Talk page has been recently edited (gives a message)
The result the user sees on the screen depends on:
*the XHTML code
*files referred to by the XHTML code, such as embedded images and a server-side css file.
*the browser and browser settings, including possibly a local css file, and the screen resolution.
When the user presses the '''Edit button,''' the wikitext itself is sent to them, of the whole page or of one section only. When the user presses '''Preview,''' their new version of the wikitext is sent to the server, which sends the corresponding new version of the XHTML code, which is rendered again and displayed above or below the user's new version of the wikitext (which the server has also returned). After possibly more changes and more previews, the user presses '''Save,''' sending their "final" version to the server, which now records the edit and sends the XHTML of the new version (again). In some cases also an [[Help:Automatic conversion of wikitext|automatic conversion of wikitext]] takes place in this stage.
See also [[Help:Downloading pages#Downloading_a_MediaWiki_page|Differences between wikitext and the webpage]].
==General Architecture==
{| border="1" cellpadding="6" cellspacing=0
|+ '''General Architecture'''
! User Layer
| align=center|[[Wikipedians|Web Clients]]
|-
!Network Layer
| align=center|[[Apache config|Apache Webserver]]
|-
! Logic Layer
|
{| border="1" align=center width="100%" cellpadding="2" cellspacing=0
| align=center|[[MediaWiki code layout|MediaWiki's PHP scripts]]
|-
| align=center|[[PHP config|PHP]]
|}
|-
! Data Layer
|
{| border="1" align=center width="100%" cellpadding="2" cellspacing=0
|[[MediaWiki file usage|File System]]
|[[Database layout|MySQL Database]]
|[[memcached|Caching System]]
|}
|}
See also: [[How to become a MediaWiki hacker]]
For Wikimedia, see also [[Wikimedia servers]].
Next: [[Database layout]] >