Chapter 1. A First Look

“The whole world is singin’ this song...wikki-wikki-wikki-wikki....”

Newcleus, “Jam On Revenge”

A wiki is a website that lets people freely create, edit, and link a collection of articles. Now, every website can be considered a bunch of interlinked pages, but wikis allow the content and the structure to be changed by a community. Wikis are a great way for a group of people to coordinate and create content, even if that group is made up of thousands of people in different places.

Here are some typical things you can do on a wiki:

  • Create an article on a topic that interests you.

  • Make changes to other people’s articles, without requiring their permission.

  • Create links between articles.

  • Group similar articles together into convenient categories.

  • View the history of an article to see all the changes, who made them, and when.

  • See interesting statistics about the articles: which ones are most popular, which ones probably need updating, and so on.

Wikis are often devoted to a particular topic or theme. Wikipedia (http://www.wikipedia.org) is an encyclopedia, videoville (http://www.videoville.org) is devoted to music videos, The Aquarium Wiki (http://www.theaquariumwiki.com) covers aquatic topics, and so on. Within corporate intranets, wikis serve as documentation systems and help employees share knowledge.

What’s MediaWiki?

MediaWiki is the world’s most popular wiki software, and with good reason. It’s pretty easy to use, has powerful features, is highly configurable, scales up to millions of users, and best of all, it just plain works. More than 2,000 wikis are powered by MediaWiki worldwide, including Wikipedia.[2] Thanks to the generosity of its creators, MediaWiki is freely available, so anyone can create wikis with it.

Note

Wikipedia has some features that aren’t standard in MediaWiki. We’ll point them out as they come up.

MediaWiki is freely distributable,[3] so you can download, install, run, and share it without cost. It’s also open source, so any competent programmer can modify its internal behavior (its source code) if desired.

A Typical Day on a MediaWiki Site

To give you an idea of the workings of a wiki, here’s a short story about a nonexistent wiki and its users.

It’s a sunny day on the Web, and the hard drives are humming at BongoWiki, a popular wiki devoted to musical instruments. Users from around the world come to www.bongowiki.org, log in with a username and password, and create and edit articles. At the moment, user Wackerman is creating a new article about snare drums, and user StrataVarious is updating an older article on violin strings.

Wackerman uses the wiki’s built-in search engine to check for an existing snare drum article. Finding nothing, he clicks an Edit link and begins writing: not just words, but additional symbols called wikitext that produce headings, bulleted lists, graphical images, and other typesetting effects. His first sentence looks like this:

The '''snare drum''' is an essential part of a [[drum kit]].

The triple quotes mean “display this word in boldface,” and the brackets produce a link to another wiki page, drum kit. When finished, Wackerman previews his work, enters a change comment to describe what he’s done, and saves the article. It is instantly available for other users to read.

Meanwhile, StrataVarious has browsed to an article on violin strings by following category links. Beginning in the Instruments category, she browses to Stringed instruments, then Violins, then Violin parts, and finally to the article called Violin strings. Clicking the Edit link, she makes the necessary changes, previews the results, enters a change comment, and saves.

Behind the scenes, a wiki sysop named Scribe is monitoring activity on the site. She visits the Recent Changes page, notices the edits by Wackerman and StrataVarious, and checks that they conform to the wiki’s published standards. She fixes a broken link in the Violin strings article, enters her comment, and saves. Then she visits the New Pages page to see what articles have appeared today and, to her surprise, discovers that an anonymous user has created hundreds of articles with nonsense names. It’s a clear case of wiki vandalism. Using a special page on the wiki, she bans further edits from that user’s IP address. Then she heads to a discussion area called a talk page and posts a note for other sysops, proposing that wiki edits should be restricted to logged-in users only. Other sysops disagree, and vigorous debate follows.

Another sysop, Conductor, reads Scribe’s note and begins deleting the bogus articles. After several dozen, he gets tired and wishes there were a way to remove all the vandal’s articles in one shot. He emails a wiki administrator, explaining the problem. Using the PHP programming language, the administrator creates and installs a MediaWiki extension that deletes all recent articles coming from a given IP address.[4] Conductor runs the extension and wipes out the bogus articles instantly.

Over many months, BongoWiki grows to be the largest and most trusted repository of musical instrument knowledge on the Web. And yet none of the hundreds of authors have ever met one another in person. This is the power of wikis.

When to Use MediaWiki

As the preceding story demonstrates, MediaWiki is a terrific collaborative tool. It’s ideal for:

Informal knowledge-sharing

With its “anyone can edit anything” philosophy, MediaWiki works well for building a repository of knowledge in bits and pieces. It’s far lighter-weight than the big, commercial content management systems.

Quick turnaround

MediaWiki is easy and rapid to use. Not all features are easy to learn, but once you know them, you can search, modify, and maintain the content very efficiently.

Communities of like-minded people

MediaWiki is fantastic for rapid, informal sharing of knowledge among company employees, scientists, professors, students, and other groups. It’s particularly great for technical communities, like software developers or system administrators accustomed to markup languages like HTML.

Global communities

MediaWiki is built to be multilingual, supporting a range of languages and locales.

Ease of administration

A small number of people can run a wiki fairly efficiently for large numbers of users. Even a single capable sysop/administrator can support hundreds of readers and authors.

Reliability

MediaWiki is stable, solid software. New releases are run for months on Wikipedia before they’re packaged as official releases, so most bugs are squashed by then. The software just works.

When Not to Use MediaWiki

MediaWiki software is terrific for a community of geographically distributed, like-minded people producing an information resource. But it’s not for every purpose. In particular, it’s not for:

Applications that need strict access control

MediaWiki is a public system at its core. Although you can restrict access to individual articles and, to a limited extent, sets of articles, the software is not optimized for this purpose, maintenance gets painful as the wiki grows, and the access control methods are not necessarily secure.

General content management

MediaWiki is not a content management system (CMS). It has no workflow, its handling of uploaded documents is fairly primitive, it doesn’t integrate with popular applications like Microsoft Office, and, as mentioned, its access control model is not very flexible.

Users with limited technical skill

MediaWiki requires its users to learn wikitext, a markup language to indicate bold, italics, links, and so on, which may be a burden for nontechnical users. While you can create articles without wikitext—just by typing paragraphs of plain text—this doesn’t take advantage of the wiki’s power. Nontechnical users might be happier with a wiki that has a WYSIWYG[5] editor.

Use MediaWiki for what it does best: facilitating collaboration on a massive scale. We’ll speak more about the challenges of rolling out a MediaWiki site to users in Chapter 10.

Additional Resources

MediaWiki is extensively documented online. Most of the material is scattered throughout three sites: Wikipedia, MediaWiki.org, and Meta-Wiki, each organized in its own way. There are also a number of useful mailing lists. Here’s a quick reference guide:

Wikipedia

Wikipedia’s extensive help system, http://en.wikipedia.org/wiki/Help:Contents, documents wikitext and covers many interesting policies and procedures. These procedures are tailored to Wikipedia’s needs, but might be applicable to other wikis as well.

MediaWiki.org

The official site http://www.mediawiki.org documents the MediaWiki software, third-party extensions, wiki configuration, system administration, and much more. This is also where you download MediaWiki software and updates.

Meta-Wiki

http://meta.wikimedia.org is devoted to all the projects of the Wikimedia Foundation, including MediaWiki and Wikipedia. It also includes extensive documentation on MediaWiki’s features, though much of it is being migrated to MediaWiki.org.

mediawiki-l mailing list

Wiki features are discussed in several mailing lists described at http://www.mediawiki.org/wiki/Mailing_lists. You can subscribe or simply read the archives. The most important list for our purposes is mediawiki-l, which discusses installing and configuring MediaWiki software; its archives are at http://lists.wikimedia.org/pipermail/mediawiki-l/.



[3] Under the GNU General Public License, http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.

[4] There really is an extension like this: Nuke, by Brion Vibber, http://www.mediawiki.org/wiki/Nuke.

[5] WYSIWYG = What You See Is What You Get.

Get MediaWiki now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.