![]() ![]() If the application architect has not anticipated the need for a particular communication, it is usually impossible.įinally, the component developers must accept a hard dependency on what assembly contains the interface they implement. In addition, components are incapable of communicating with one another, except through the rigidly defined channels of the application itself. This means that assuring that the components are correct becomes a maintenance issue, particularly if it is the end user and not the developer who is expected to do the updating. This is typically accomplished by explicitly registering the available components in a configuration file. This solves the problem of requiring source code access, but it still has its own difficulties.īecause the application lacks any capacity for discovering components on its own, it must still be explicitly told which components are available and should be loaded. Under this model, you might provide an interface that a component can implement, and an API to enable it to interact with your application. Equally problematic, you may not have access to the source code for the components, because they might be developed by third parties, and for the same reason you cannot allow them to access yours.Ī slightly more sophisticated approach would be to provide an extension point or interface, to permit decoupling between the application and its components. Most importantly, you cannot add new components without modifying the source code, a restriction that might be acceptable in, for example, a Web application, but is unworkable in a client application. The simplest approach to the problem is to include the components as source code in your application, and call them directly from your code. Your application has to include a potentially large number of smaller components, and is responsible for creating and running them. Imagine that you are the architect of a large application that must provide support for extensibility. MEF not only allows extensions to be reused within applications, but across applications as well. ![]() It also lets extension developers easily encapsulate code and avoid fragile hard dependencies. ![]() It allows application developers to discover and use extensions with no configuration required. The Managed Extensibility Framework or MEF is a library for creating lightweight, and extensible applications. This topic provides an overview of the Managed Extensibility Framework that was introduced in the. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |