Helma Logo
main list history
previous version  overview  next version

Version 3 by hannes on 07. June 2008, 11:43

Plugins are Modules that are not part of the Helma distribution. The plugin manager is a module that automates the process of installing, updating and uninstalling plugins in Helma NG.

The initial plugin manager implementation is scheduled for Helma 0.3 and will have a shell interface. Later versions may feature an additional web interface.

=== Use Case

A typical plugin manager session may look like this:

    helma> importModule('helma.plugins', 'plugins');
    helma> plugins
      installed: 3 plugins
      updatable: 1 plugin
      available: 2 plugins
    helma> plugins.updatable
      module name:  profiler    installed: 0.2    available: 0.2
    helma> plugins.updateAll()
      fetching profiler... done
      updating profiler... done
    helma> plugins.available
      module name:  markdown    author: ...      version:  0.1
      module name:  test        author: ...      version:  0.3.1
      module name:  imageutils  author: ...      version:  0.6
    helma> plugins.describe('test')
      module name:          test
      version:              0.3.1
      author:              Foobert Meyer <foobert@domain.com>
        A unit testing framework for Helma NG.
        Version 0.3.1 features enhancements in the shell interface
        and a redesigned web interface.
    helma> plugins.install('test')
      fetching test... done
      installing test... done

=== Implementation

The plugin manager will use uses HTTP to fetch meta data and plugin archives from a remote plugin repository. The plugin repository will provide uses a simple directory structure to store plugins and provides JSON formatted metadata filesmetadata. How metadata is distributed organized among a central plugin list and per-plugin files, and how much information about available plugins and versions can be delegated to directory structure conventsions conventions remains to be determinedseen.

The initial plugin repository implementation will be maintained manuallyby hand. Of course we'll need want an application to manage the repository rather soon, but this is not a goal for the Helma 0.3 release. Also, adding or editing plugin repositories is not a goal for Helma 0.3.

The plugin manager will maintain local information about installed and available plugins using JSON files. The plugins themselves will be fetched as zip files. Internally, plugins are just NG modules and can contain JavaScript files, jar files, configuration files and any other kind of resourcefile resources. Whether plugins are unpacked in the NG modules directory, in a separate plugins directory, or not unpacked at all (i.e. added as zip repositories) remains to be determined.