concept extensibility in category .net

appears as: extensibility
Dependency Injection in .NET

This is an excerpt from Manning's book Dependency Injection in .NET.

This important piece of advice isn’t the conclusion, but, rather, the premise, of Design Patterns; to wit: it appears on page 18. Loose coupling makes code extensible, and extensibility makes it maintainable.

Still, these benefits may not outweigh the disadvantages of using MEF in a role it was not designed for. MEF was designed for extensibility scenarios, so it makes a lot of sense to use it in applications where extensibility is a major feature. In such applications it may make sense to expand the responsibility of MEF to include composition of the overall application, because it’s already in use.

For applications where extensibility isn’t a feature it may make more sense to select a dedicated DI CONTAINER for object composition.

Although we can place any number of assemblies in a directory and use a DirectoryCatalog to pick them up, we may want to combine catalogs from several different sources. Even if we use a DirectoryCatalog to enable extensibility, we may also want to provide some default or internal implementations of the relevant imports and exports. These shouldn’t reside in the add-in folder because that would enable users to remove vital functionality from the application. Such default implementations may be better provided by a TypeCatalog, but that means that we must combine different catalogs into one.