Jaws Addon Install Spec


This document outlines a possible solution to the problem of making the installation of gadgets and plugins quick and painless for end users.

Use Cases

The following people will represent specific users of Jaws, and how they expect things to happen.

Bob Madison

Bob is using Jaws to manage a small corporate intranet, and has found the new Super Survey 9000 gadget, which will allow him to post surveys on people’s reactions to new products internally. Jaws is running on an internal server.

  1. Bob downloads Super Survey 9000 in .tgz format from it’s website.
  2. He logs into the Jaws installation.
  3. He selects the “Package Manager” option from the displayed icons.
  4. Write access is set on the packages directory, so he is given the option to upload a package to be installed.
  5. He uploads the package, which is then extracted on the server side, and a summary displayed.
  6. Bob confirms that he wishes to install the package.
  7. Super Survey 9000 has some options to set on install, so they are displayed to Bob, who leaves them at the defaults.

Joe Douglas

Joe is running Jaws on a shared server, and would like to install the Popup Link plugin, which allows him to specify links to popup in new windows.

  1. Joe downloads Popup Link in .tgz format from it’s website.
  2. Joe extracts the package, and uploads the created directory to the web server.
  3. He logs into the Jaws administration panel.
  4. He selects the “Package Manager” option from the displayed icons.
  5. Since write access is not available, only a list of detected packages are shown, as well as their status (Installed/Not Installed).
  6. Popup Link was detected as not being installed, so a button is provided to install it.
  7. Joe clicks the button, and a confirmation screen is displayed.
  8. Joe confirms, and a completion screen is shown, since no configuration is required.


  • Quick, simple install.
  • Doesn’t require running shell programs on the server
  • Integrated with administration interface
  • Doesn’t require write access to the server (although use could be made of it if available)
  • Allows addons to specify commands to run for installation


By packaging gadgets and plugins in a specific format packages can be easily installed via the administration interface.

Addon Format


Each package must contain the file AddonName.php at a minimum, but can contain any other files required.

As a rule a package will store *all* required resources (templates, additional classes, translations etc.), which if required should be kept in the same file structure as our example package.

Packages will usually be distributed as gzipped tarballs (.tgz), which can either be extracted by hand, or by the addon installer if it has write access.

«by drslump@drslump.biz» I suppose widgets and plugins are loaded with some type of manager so it should be possible to allow them to be stored in the DB. After all a DB is required to use Jaws and if write access is not available and the user doesn’t want to mess with uploading files, the widgets could be served from a DB table. If some kind of cache is implemented into the cms the widgets could also be cached for better performance.

Super Survey 9000

Super Survey 9000 is the package Bob was installing earlier. It is a gadget which provides a complete interface for publishing customer survey style questionares, and obtaining the results.

Package Structure

‘’ROOT (SuperSurvey9000-1.0.tgz) |– SuperSurvey.php |– lib | |– SurveyModel.php | |– HtmlView.php | |– SOAPView.php |– lang | |– en.php | |– es.php |– templates | |– display.html | |– results.html | |– admin.html |– resources

 |-- logo.png
 |-- icon.png''

SuperSurvey.php is the main Gadget file, containing a definition for the SuperSurvey class, which extends the base gadget class.

When being installed the package information will be read by running SuperSurvey::PackageInfo() statically, which should return an array of this format:

array("name" => "Super Survey 9000",
      "version" => "1.0",
      "author" => "Super Computing Inc.",
      "plugin" => false,
      "gadget" => true,
      "icon" => "resources/icon.png");

On installation if the method SuperSurvey::Install() is defined it will be called.

TODO: Adapt Install() to allow calling from web services. The Install() method can do whatever it wishes to, however each call must return an array of this format:

array("subtitle" => "Setup: Contact",
      "content" => "<p>Yadda, yadda, yadda.</p>",

The INSTALL_* constants represent the different states the installation can be in.

If INSTALL_COMPLETE is sent a success message can be displayed, which should also include the content field.

If INSTALL_FAILED is sent, a failure message can be display, which must contain the content field.

If INSTALL_RUNNING is sent, the content field must be displayed.

Nice Things To Have

Automatic downloading It would be good if you could simply enter the URL to a package file, and the package would be downloaded, and installation started.

Package Web Service Probably a more long term thing, but some sort of package registry, probably hosted from the Jaws website, which can be interfaced with by the local system via a web service. Just providing the package information, including URL for downloading it, and an install button.

Update Notifications Packages notifying when they get updated. Probably through the web service.

  /var/www/wiki/htdocs/data/jaws/installer.txt · Last modified: 2007/11/02 16:27