Tech:Plugin Interface

Redirected from Tech:addon
ktip.png This page (and all pages in the Tech: namespace) is a developer discussion about a feature that is either proposed for inclusion in JAMWiki or one that has already been implemented. This page is NOT documentation of JAMWiki functionality - for a list of documentation, see Category:JAMWiki.
Status of this feature: NOT IMPLEMENTED. Implementation of a generic plugin architecture is still a very difficult topic from both a scope and implementation standpoint.

This document captures requirements and design discussions for a JAMWiki plugin interface.

Contents

[Edit]Description

[Edit]Author(s)

[Edit]Status

[Edit]Comments

[Edit]Initial thoughts

A number of Feature Requests are items that could be implemented via a plugin architecture. A more specific discussion took place at Tech comments:addon. My personal preference would be that a plugin architecture would follow these principles:

  • Easy to use. Allow users to drop a JAR file into their classpath and perhaps update one configuration setting (preferably via a web interface) and the plugin can then register itself and expose configuration and other features. Something like a [[Special:Plugins]] page could be created to manage installed plugins.
  • As non-intrusive as possible. I'd like to see a well-defined plugin interface, possibly with sub-interfaces, so that plugins can register themselves for execution without the need to massively modify existing code. Use cases would probably be helpful in determining how this could be done:
    • Captcha for user registration and/or editing.
    • Spam filter (both web-based administration and executing against edit content).
    • User tools, such as the Mediawiki calendar.
  • I'd prefer that any initial implementation focused on converting existing functionality rather than adding new functionality, so (for example) the spam filter could be re-implemented as a plugin.

There are a number of frameworks that offer plugin support, but since JAMWiki utilizes Spring and J2EE I would prefer to use the tools available in that structure rather than introducing anything new - a Google Search reveals several techniques.

Also note that I'm thinking there would be a difference between plugins and extensions to the parser - the parser code is very different from the rest of the JAMWiki code, and I would prefer to keep these two areas separate. -- Ryan • (comments) • 31-Jul-2010 11:00 PDT