Ideas About Plugin Architecture for Input and Output

Based on our discusssions in #adt (irc.freenode.net) there are two kinds of plugins (or similar) we want to enable - input sources and output types. Here is a list of ideas and thougths on what has been discussed.

Input Sources

  • Input plugin provides data that is shown by the debug filter
  • An example input source would be a flat file (e.g. a log file). The plugin would read the file or, say, last 15 lines and the debug filter / toolbar would automatically add a section for the data provided by the plugin.
  • Input plugins of course need a well-defined interface
  • We need to think about what kind of data a plugin can provide. "plain text" and "tabular" are two obvious options. Others? Should we even care?

Output Types

Currently the debug toolbar works like this: AdtDebugFilter collects the data but doesn't output anything. This is also the base class that is going to handle input plugins. AdtDebugToolbar extends AdtDebugFilter and adds rendering to HTML. The original idea was that additional output types would just do what AdtDebugToolbar does now - extend and add a new output type rendering. All the data is collected by the base class so a developer just has to output it in a way he wants to.

However, it's still to be decided if this is the optimal choice or do we need some plugin system for this too. Personally (me, v-dogg) don't see what the benefits of this would be because:

  • I don't see a situation where more than one output type would be wanted. In my opinion different output types are for different environments and each environment has it's own configuration.
  • The amount of configuration needed for a plugin and for filter is not significantly different.
  • Having a base filter that others extend makes it possible to add other customer features while adding a new output type. For example output is currently done in executeOnce after all the actions have been executed. But someone might want to output something before or after each action. To make a plugin architecture that allows this is going to be a lot more difficult than having everyone just extend the base filter (AdtDebugFilter) and adding just those feature the want.
  • "So Many Files" argument is void (now and forever :). We can't bloat the filter with all output types and outsiders must be able to define their own output types (of course without modifying our code). So the at most we can loose one file by stuffing HTML toolbar rendering into the base filter.
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

0.188% complete

 

Completed 14 of 16 tickets

Pages