0
David Giard<br />MCTS, MCSD, MCSE, MCDBA<br />Principal Consultant, Sogeti<br />www.DavidGiard.com<br />DavidGiard@DavidGi...
Managed Extensibility Framework<br />Beta 2<br />
Compile and Deploy<br />Tight Coupling<br />DLL<br />DLL<br />EXE<br />
MEF<br />Loose Coupling with mef<br />Compile and Deploy<br />DLL<br />DLL<br />EXE<br />DLL<br />Contract<br />Contract<b...
Managed Extensibility Framework<br />Applications consists of loosely-coupled components that are discovered and composed ...
Advantages of mef<br />Loose Coupling<br />Swap Classes at Runtime<br />No Recompile or Redeploy<br />Single Plug-In Archi...
MEF Usage Scenarios<br />Empower developers to extend your application without modifying it<br />Provide extra modules to ...
Demo<br />G/L<br />Modules for Accounting app<br />A/R<br />MEFApp<br />(Accounting)<br />GenSetup<br />A/P<br />Export<br />
Existing Extensibility in .Net<br />Visual Studio Add-Ins<br />Microsoft Tools for Office<br />Rules Engines<br />WCF<br /...
Get Started<br />MEF.CodePlex.com  <br />Download and unzip MEF_Beta_2.zip<br />Zip file contains<br />DLLs<br />Samples<b...
Developer Steps<br />Set Reference to System.ComponentModel.Composition.dll<br />Contract<br />Import<br />Export<br />Cat...
MEF<br />Contracts<br />[Import(“Contract1”)]<br />String  SomeThing {get; set;}<br />[Export(“Contract1”)]<br />Public st...
MEF<br />Contracts<br />[Import(“Contract1”)]<br />String  SomeThing {get; set;}<br />[Export(“Contract1”)]<br />Public st...
MEF<br />Interface Contracts<br />[Import(typeof(IFoo))]<br />IFooSomeFoo {get; set;}<br />[Export(typeof(IFoo))]<br />pub...
MEF<br />Interface Contracts<br />[Export(typeof(IFoo))]<br />public Foo1: IFoo{<br />…<br />}<br />[ImportMany(typeof(IFo...
Composition<br />varcatalog1     = newDirectoryCatalog(@&quot;c:MEFImports&quot;);<br />var container = newCompositionCont...
Demo<br />Using MEF<br />
MEF vs  Dependency Injection<br />
rESOURCES<br />http://MEF.codeplex.com<br />http://www.davidgiard.com<br />http://msmvps.com/blogs/kathleen<br />http://bl...
User Groups<br />Great Lakes Area .Net User Group<br />Southfield, MI<br />migang.org<br />Greater Lansing .Net User Group...
Dave’s Thoughts<br />DavidGiard.com<br />TechnologyAndFriends.com<br />DavidGiard@DavidGiard.com<br />
Upcoming SlideShare
Loading in...5
×

Managed Extensibility Framework 2010 01

2,414

Published on

Published in: Technology, Education
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,414
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
29
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • Photo by Andres Rueda: http://www.flickr.com/photos/andresrueda/2983149263/ Creative Common, Attribution-No Derivative
  • Transcript of "Managed Extensibility Framework 2010 01"

    1. 1. David Giard<br />MCTS, MCSD, MCSE, MCDBA<br />Principal Consultant, Sogeti<br />www.DavidGiard.com<br />DavidGiard@DavidGiard.com<br />
    2. 2. Managed Extensibility Framework<br />Beta 2<br />
    3. 3. Compile and Deploy<br />Tight Coupling<br />DLL<br />DLL<br />EXE<br />
    4. 4. MEF<br />Loose Coupling with mef<br />Compile and Deploy<br />DLL<br />DLL<br />EXE<br />DLL<br />Contract<br />Contract<br />Contract<br />Contract<br />
    5. 5. Managed Extensibility Framework<br />Applications consists of loosely-coupled components that are discovered and composed at runtime<br />
    6. 6. Advantages of mef<br />Loose Coupling<br />Swap Classes at Runtime<br />No Recompile or Redeploy<br />Single Plug-In Architecture<br />
    7. 7. MEF Usage Scenarios<br />Empower developers to extend your application without modifying it<br />Provide extra modules to your application, as needed<br />Use MEF as an platform ecosystem to manage all parts of your application<br />
    8. 8. Demo<br />G/L<br />Modules for Accounting app<br />A/R<br />MEFApp<br />(Accounting)<br />GenSetup<br />A/P<br />Export<br />
    9. 9. Existing Extensibility in .Net<br />Visual Studio Add-Ins<br />Microsoft Tools for Office<br />Rules Engines<br />WCF<br />Interfaces<br />Reflection<br />IOC / Dependency Injection<br />
    10. 10. Get Started<br />MEF.CodePlex.com <br />Download and unzip MEF_Beta_2.zip<br />Zip file contains<br />DLLs<br />Samples<br />Source Code<br />
    11. 11. Developer Steps<br />Set Reference to System.ComponentModel.Composition.dll<br />Contract<br />Import<br />Export<br />Catalogs<br />Composition<br />Import<br />Contracts<br />Export<br />
    12. 12. MEF<br />Contracts<br />[Import(“Contract1”)]<br />String SomeThing {get; set;}<br />[Export(“Contract1”)]<br />Public string SpecialThing{<br />Get {return “A Value”};<br />}<br />“A Value”<br />
    13. 13. MEF<br />Contracts<br />[Import(“Contract1”)]<br />String SomeThing {get; set;}<br />[Export(“Contract1”)]<br />Public string MoreSpecialThing{<br />Get {return “A Different Value”};<br />}<br />“A Different Value”<br />
    14. 14. MEF<br />Interface Contracts<br />[Import(typeof(IFoo))]<br />IFooSomeFoo {get; set;}<br />[Export(typeof(IFoo))]<br />public Foo: IFoo{<br />…<br />}<br />new Foo()<br />
    15. 15. MEF<br />Interface Contracts<br />[Export(typeof(IFoo))]<br />public Foo1: IFoo{<br />…<br />}<br />[ImportMany(typeof(IFoo))]<br />List&lt;IFoo&gt; BunchOfFoos{get; set;}<br />new Foo1()<br />[Export(typeof(IFoo))]<br />public Foo2: IFoo{<br />…<br />}<br />new Foo2()<br />
    16. 16. Composition<br />varcatalog1 = newDirectoryCatalog(@&quot;c:MEFImports&quot;);<br />var container = newCompositionContainer<br />catalog1);<br />container.ComposeParts(this);<br />Catalogs<br />TypeCatalog<br />AssemblyCatalog<br />DirectoryCatalog<br />AggregateCatalog<br />PackageCatalog (Silverlight toolkit)<br />
    17. 17. Demo<br />Using MEF<br />
    18. 18. MEF vs Dependency Injection<br />
    19. 19. rESOURCES<br />http://MEF.codeplex.com<br />http://www.davidgiard.com<br />http://msmvps.com/blogs/kathleen<br />http://blogs.msdn.com/gblock<br />http://tinyurl.com/TaultyMEFSilverlightVideos<br />NPlus1.org<br />David Giard, MCTS, MCSD, MCSE, MCDBA<br />www.DavidGiard.com<br />DavidGiard@DavidGiard.com<br />
    20. 20. User Groups<br />Great Lakes Area .Net User Group<br />Southfield, MI<br />migang.org<br />Greater Lansing .Net User Group<br />East Lansing, MI<br />glugnet.org<br />
    21. 21. Dave’s Thoughts<br />DavidGiard.com<br />TechnologyAndFriends.com<br />DavidGiard@DavidGiard.com<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×