UvodDoKomponent: MEF

from Wiki KIVu

Theoretical section

1. Introduction

The Managed Extensibility Framework (MEF) is a composition layer for .NET that improves the flexibility, maintainability and testability of large applications. MEF can be used for third-party plugin extensibility, or it can bring the benefits of a loosely-coupled plugin-like architecture to regular applications (MEF support a Plugin Model).

There are two versions of MEF:

2. MEF model

Roughly speaking, MEF's core is comprised of a catalog and a CompositionContainer?. A catalog is responsible for discovering extensions and the container coordinates creation and satisfies dependencies.

Longer description here (codeplex wiki).

3. MEF Examples

1. Evil Wizard example - basic usage of MEF.
2. Catalogs example - more Catalog focused
3. Hello World example - External *Codeproject* site!

4. MEF Architecture

MEF as seen on Fig. below, is divided into three main layers Container, Primitives and Attributed Programing Model. Each of these parts is described in Full MEF Architecture here.

Fig: Different layers in the Managed Extensions Framework.

5. More about MEF

Are you interested to know more about MEF (e.g. "MEF vs standard IoC Container", "MEF Visualizer", "Why to use MEF", "More learing materials" etc.) click here .

6. Literature

Practical section

Parking lot example writen in C# without using MEF ParkovistePlain. Implementation Attach:ParkingLot_Plain.zip

Parking lot example writen in C# using MEF Dependency Injection ParkovisteMEF. Implementation Attach:ParkingLot_MEF.zip

Retrieved from http://wiki.kiv.zcu.cz/UvodDoKomponent/MEF
Content last modified on 24 September 2015, 15:10