WardCunningham/Smallest-Federated-Wiki — Issue #112: Replace emit/bind as plugin api
Author: WardCunningham
Created: 2012-01-30 19:01:25+00:00
State: open

The plugin api evolved to solve one not-to-interesting problem: distinguishing startup code required for static(html) and dynamic(json) wiki pages. Weaknesses have emerged:

* some doubt the utility of static html -- we preserve it mostly for seo
* a carelessly assembled collections of utilities have emerged in the wiki object
* the api has been converted to one using callbacks to deal with issues loading dependencies
* story item types with text have to repeat the binding of the textEditor

We've also bastardized the plugin/factory interface to suggest how factories might work

* the factory plugin has been split into a meta-factory which is converted to a factory plugin by the server
* the server inserts a plugin menu as part of this conversion
* the conversion menu has been hardwired since it is not easy for the server to tell what plugins it hosts
* the drop handling in the factory plugin could delegate some case analysis to plugins
* it is left as an exercise for the site owner to figure out how to add new plugins

Finally, Adam points out that plugins know way too much about how the mouse works

* https://github.com/WardCunningham/Smallest-Federated-Wiki/issues/100#issuecomment-3724031

In this issue I'd like to hear some suggestions as to a good path forward. Hopefully we can continue to work in smallish increments.