Hlavní menu

Nástroje

UvodDoKomponent / MEFmore

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

Updated 28 January 2015, 14:10 by Eduard Chromik

UvodDoKomponent.MEFmore History

Hide minor edits - Show changes to markup

28 January 2015, 14:10 by Eduard Chromik -
Changed lines 70-71 from:
to:

Interestiong links

  • Spring.NET & Attribute Driven Configuration
  • MEF Runtime Plugin Swapping

TODO

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/

28 January 2015, 14:09 by Eduard Chromik -
Changed lines 46-71 from:

@]

to:

@]

6. Why to use MEF

10 reasons why to use MEF

7. Good explanations

Audio

  • Audio: MEF with Glenn Block IoC, DI vs MEF

Code

  • Code: Barbarian Meets MEF
  • Code: Glenn Block - Building Composable Apps in .NET 4 with the Managed Extensibility Framework Complete explanations of MEF capabilities
  • Code: Complete MEF Programming Guide

Video

  • Video: MEF Oleg Lvovitch and Kevin Ransom Introduction, MEF 2.0
  • Video: MEF Jan Steberl CZ Introduction MEF - CZ

Presentation

  • Presentation: Lecture by Nuno Cancelo
  • Presentation: Lecture by Mohamed Meligy
28 January 2015, 13:53 by Eduard Chromik -
Added lines 1-46:

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:

  • Code as Configuration
  • Auto Registration
  • XML configuration
  • Custom Lifetimes
  • Interception (another example Interception using Dependency Injection Container)

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:

  • Containers comparsion (another Unity, StructurMap, Autofac, Castle Windsor, Ninject facilitates and Spring.NET comparsion)
  • OSGi.net

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