wiki:PluginProposal

working on this. nothing to see yet

Plugin Proposal

I hereby propose a simple plugin architecture that will help us separate unrelated functionality. The reasoning behind plugin architectures is that separating unrelated pieces of code and connecting them with a simple and standard API will yield more robust and extensible software.

While the current website has a relative limited set of features, it will soon have to grow and encompass tags, polls, statistics, component development competitions etc. Existing features like ratings, forum and rankings could easily be seen as separated pieces of functionality. It is only natural to separate such clusters of functionality. We can't go on forever growing a monolithic piece of code.

A plugin architecture enables us to create customized distributions / installations of our software.

Anatomy of a Plugin

What can a plugin provide?

  • data models
  • macros
  • controllers
  • views & templates
  • static content

Installation & Dependencies

You install a plugin by copying a directory in the right place. All plugin files should be contained in a single / copy-able directory. Plugins know by themselves to update the database schema.

Plugins may depend on various system libraries but also on other plugins. If you have such dependencies, you code a check_requirements() function. A global plugin manager can tell whether a plugin exists and is loaded.

Un-installation

Remove the directory.

Directory Structure

...

Plugin Manager

...