Managed Extensibility Framework

Source: Internet
Author: User
Tags visual studio visual studio 2010

Building a reusable application in. NET 4 using the Managed extensibility framework

The Managed Extensibility Framework (MEF) is a new library in the. NET Framework 4 and Silverlight 4 that simplifies the design of a composite system that can be extended by third parties after deployment. MEF allows your application to be open, allowing application developers, framework writers, and Third-party extenders to continually introduce new functionality.

Reasons for building a managed extensibility framework

A few years ago, within Microsoft, some teams were working to find a solution to a problem, namely, how to build dynamically discovered, reused, and combined applications based on reusable components:

Visual Studio 2010 was building a new extensible Code editor. The core features of the editor, as well as Third-party functionality, are deployed as binary files found at run time. One of the core requirements is to support deferred load extensions to reduce startup time and memory consumption.

"Oslo" introduces "Intellipad", a new extensible text editor that can use MEF. In Intellipad, Plug-ins are written using IronPython.

Acropolis provides a framework for building composite applications. The Acropolis runtime discovers application component "parts" at run time and provides services to these parts in a loosely coupled manner. Acropolis uses XAML extensively to write components.

This issue is not unique to Microsoft. Over the years, customers have been implementing their own custom scalability solutions. Clearly, this is a good opportunity for the platform to step into this area and provide a more versatile solution that will help Microsoft and customers achieve a win.

Do we need something new?

In any case, MEF is not the first solution to this problem. Many solutions have been proposed-there are countless attempts across platform boundaries, including EJB, CORBA, Eclipse OSGI implementations, Java-side Spring, and so on. On the Microsoft platform, the. NET Framework itself contains component models and System.AddIn. There are several open source solutions, including SharpDevelop's SODA architecture and "control reversal" containers (such as Castle Windsor, Structure Map, and Unity of schema and practice).

Now that these methods are in use, why should new things be introduced? This is because we realize that all of our current solutions are not ideal for conventional third-party scalability. These solutions are either too large for general purposes or require a host or extended developer to do too much work. MEF has the best of all of these solutions and tries to solve the headaches that have just been mentioned.

Let's look at the core concept of MEF, as shown in Figure 1.

Figure 1 Core concepts in the Managed extensibility framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.