UploadWizard/Software design

Some documentation for developers and reviewers interested in how UploadWizard works.

PHP (server side files)


 * New
 * includes/upload/UploadFromFileToStash.php
 * includes/upload/UploadBase.php
 * includes/upload/SessionStash.php
 * includes/specials/SpecialSessionStash.php
 * extensions/UploadWizard/SpecialUploadWizard.php
 * extensions/UploadWizard/UploadWizard.alias.php
 * extensions/UploadWizard/UploadWizard.i18n.php
 * extensions/UploadWizard/UploadWizardMessages.php (DEPRECATED in favor of Resource Loader)
 * extensions/UploadWizard/UploadWizardPage.php (Mostly DEPRECATED in favor of Resource


 * Modified
 * includes/upload/UploadFromFile.php
 * includes/api/ApiUpload.php
 * includes/filerepo/File.php


 * Changed config
 * includes/AutoLoader.php
 * includes/SpecialPage.php
 * languages/messages/MessagesEn.php

Javascript files -- to be documented --

Overview
UploadWizard is:
 * a multiple file uploader, with some "batch" capabilities
 * with a "wizard", step-by-step interface
 * with improved metadata and licensing entry
 * Designed to be deployed on Wikimedia Commons, although it should be useful for many other wikis

To achieve this, we've changed a lot about how uploads are accomplished.

The standard Mediawiki way


This is the how media uploads have worked for a long time with MediaWiki -- very simply.

The file is uploaded with an HTML form, along with wikitext for the File: page that will surround the image.

Each wiki page could be very different; there's little standard formatting.

However, we still use the base operation here -- to upload a media file with accompanying wikitext.

The Commons way


This is how Wikimedia Commons works in late 2010.

Nothing fundamental has changed here -- they are still uploading a media file with some associated wikitext. But it's being done just a little differently. There is more bureaucracy up front to try to categorize various media types. (At left we see only one example of many.) The user fills out a form, and some Javascript on the page creates equivalent wikitext, and sends that with the media file to the server.

There is much more preamble, as they feel they need to warn uploaders about Commons' licensing and interface requirements in very scary text.

The form page is very complicated, and has more structure and required fields, but ultimately it's just creating wikitext.

While an improvement over the previous version, the usability is now very poor. The page spends half its time warning you about bad things that can happen.


 * This is largely because they are still tied to an interaction model where it all comes down to just one click, which will add all the information to the database and publish the file almost immediately. Over time, Commons administrators have become very fed up with people who publish files which need to be taken down, and have piled on warning after warning.


 * Also, the page cannot provide sensible defaults for many of the fields since it has no way of analyzing the file itself.


 * The page doesn't have any structure flow to it -- it's just trying to amass as much information as possible in one go.


 * The page is just generally poorly organized, with questions about authorship and licensing scattered all over the page.


 * Mistakes or errors usually cause the user to lose work, and it's possible to make *many* mistakes since the form fields all inter-relate.


 * The interface elements can be somewhat bizarre and non-standard


 * Much screen real estate is given over to rarely-needed UI.