Hlavní menu


UvodDoKomponent / MEFmore

View (print) - Edit page | Recent changes - Page history

Updated 28 January 2015, 14:10 by Eduard Chromik

5. MEF vs standard IoC Container

Nicely writen article about "Mef vs IoC" here.

DI is based on three dimensions, Object Composition, Lifetime Management, and Interception. MEF has potential, but as a DI container, it lacks:

For Lifestyle it lacks:

  • Per graph
  • Web Request Context
  • Thread Context
  • Session Context
  • Pooled
  • Scoped
  • Custom Reference

Its a option to use MEF as a Extension for standard IoC container more.

.NET IoC/DI options:

5. MEF Visualizer

Helps to see what is going on inside the MEF Composition Container. Download

Container = new CompositionContainer(
               new AggregateCatalog(
                    new AssemblyCatalog( Assembly.GetExecutingAssembly() ) ,
                    new AssemblyCatalog( Assembly.LoadFrom( @"MEFVisualizer.Exe" ) )
                    ) );

Container.Compose( batch );

var meftoDgml = new MEFToDGML( Container){ IsNamespaceGrouping = true };   // The Visualizer

meftoDgml.WriteToDGMLFile();   // Write to DGML file

6. Why to use MEF

10 reasons why to use MEF

7. Good explanations





Interestiong links


http://channel9.msdn.com/posts/NET-45-Oleg-Lvovitch-and-Kevin-Ransom-Managed-Extensibility-Framework-MEF-20 http://www.codeproject.com/Articles/376033/From-Zero-to-Proficient-with-MEF http://www.codeproject.com/Articles/37579/Managed-Extensibility-Framework-Part https://emcpadden.wordpress.com/2008/12/07/managed-extensibility-framework-and-others/