An issue to discuss to discuss the Context Builder API and implementation.
What is outstanding in terms of the CB?
public interface IContextBuilderBundle
public interface IContextConfig
public interface IContextExtension
I am finding it less than obvious what belongs in a bundle vs. a config vs. an extension. And the ContextBuilder code for managing these 3 things has some duplication. Also, ConfigManager and ExtensionManager have some duplication and feel a bit like busywork.
I have a naive thought that some of these could be replaced with prescriptive commands with [Inject] points and an interface that indicates the thing can be installed/uninstalled. I hope we can reduce the number of concepts and types a bit. Just a gut thing; could be wrong.
IContextConfig, IContextBuilderBundle, IContextExtension, ExtensionManager etc, are monsters and I apologise for their existence. They are the shameful remnants of one of my failed attempts at solving a couple of problems.
Essentially, extensions and bundles need a way to hook in to the builder/context life-cycles in order to configure things at different stages of the build process.
Sometimes these extensions only need to know when the builder/context entered into a specific phase.
For example, an extension that simply wants to put a mapping into the injector must, at the very least, wait for an injector to be available and finalised before it can safely do.
An extension that depends on services offered by another extension can only configure itself when those services have been made available (mapped into the injector).
And there are times when an extension needs to be able to suspend the build at a particular point and wait for a file or module to load, or some other asynchronous process to complete.
jQuery Deferred (Promise/A)
I mentioned in our other discussion http://disq.us/4tyhr6 that I like the current approach. What I like is using command like objects In the Builder to configure my Context.
Indeed, the main thing was just to get the rough shape of the framework in place.
My new approach is in place and feels fairly resolved. Closing this for now, feel free to re-open.