avbel/new_core_demo — pull request #1 by jagoda (2014-07-02 18:07:14+00:00)
Title: Make everything a plugin.

This change makes everything (even the main app's "entry point") a plugin. It also adds the ability for plugins to export an API. Promises are used to ensure that dependency processing is done in the correct order and that all child plugins have finished loading before a parent can fully process. One assumption of this approach is that the core is basically stateless from the application's perspective. All state is managed via plugin (or external) APIs.

In future iterations, we could conceivably use a form of dependency injection to make plugin loading even easier (granted this starts to venture into "magic" territory).