clux/modul8 — Issue #5: CLI Plugin interface
Author: clux
Created: 2011-11-16 07:25:47+00:00
State: open

Difficult to decide on. It has to be simple enough to use nicely in the CLI, yet advanced enough to be fully configurable in case of a big plugin.

In current master: Plugins all take ordered constructor arguments coerced from strings to be able to be inputable via
-g pluginName:[arg1,arg2,...].
PRO: very easy to write
PRO: for simple plugins, this is the easiest.
CON: if plugins take a lot of dependent arguments down the line, it gets crazy.

Alternatively, Plugins could be configurable from a json file.

PRO: Reading input from a config file could be done via a base class that all plugins must extend.
PRO: In case more is needed later, easy to extend then.
PRO: Gain named parameters
CON: Can't serialize that much better than what we can already
CON: Have to deal with several config files for plugins when using the CLI.

/me has a think