Introduction to the MEF (managed extensibility framework) architecture under. net4

Source: Internet
Author: User
ArticleDirectory
    • Main Components
    • Main class diagram
    • Others

In the previous article, WPF-. Net 4.0 solved the memory leakage during the DataGrid group, saying that due to memory leakage,OpenexpressappUpgrade to the. net4 platform.CompositewpfSomething went wrong. Considering the dynamic extension component mechanism of openexpressappMEFBut it was not mature at the time, so compositewpf was used, and now MEF has become. net First Citizen, compositewpf is not provided yet. the net4 version has not been upgraded for a long time, and it is not clear about its development direction. Some memory leakage problems in the software are also related to it. Therefore, MEF is simply used as a plug-in mechanism. Here we put forward these two ideas together, mainly from the dynamic expansion components. They are actually not a thing and can coexist. I will not talk about them here, next, I will introduce the MEF architecture. I hope I can understand it as a whole. After I change the openexpressapp, I will write another article to introduce how to use MEF in openexpressapp.

Main

Various export providers extract part information from the directory and then assemble it by compositioncontainer. Each part contains the Import and Export contents.

Main Components

It consists of containers, basic class libraries, and attribute programming models. In fact, there are not many components. To expand your own things, you must be familiar with these things.

I just want to use MEF instead of prsim to implement plug-in extension mechanism. Due to time constraints, I cannot study it in depth. So I have used some of these classes, such: compositioncontainer, compositionbatch, assemblycatiner, directorycatalog, and attribute mark. I will change it from prsim to MEF later.

Main class diagram

For details, refer:

Hosting the. NET composition primitives.pdf

 

Others

Refer to blog:

A crash course on the MEF primitives

MEF: dependencies are queries?

Hosting the. NET composition primitives.pdf

Use the managed scalability framework in. Net 4 to build applications that can be combined

Msdn-managed extensibility framework Overview

 

Project Website:

Managed extensibility framework 

Managed extensibility framework Contrib

 

Open source information system development platform-openexpressapp Framework 1.1 spring festival official release

You are welcome to reprint it. Please note: Reprinted fromZhou jingen [http://zhoujg.cnblogs.com/]

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.