Your SlideShare is downloading. ×
0
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Managed Extensibility Framework 2010 01

2,408

Published on

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

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

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Photo by Andres Rueda: http://www.flickr.com/photos/andresrueda/2983149263/ Creative Common, Attribution-No Derivative
  • Transcript

    • 1. David Giard<br />MCTS, MCSD, MCSE, MCDBA<br />Principal Consultant, Sogeti<br />www.DavidGiard.com<br />DavidGiard@DavidGiard.com<br />
    • 2. Managed Extensibility Framework<br />Beta 2<br />
    • 3. Compile and Deploy<br />Tight Coupling<br />DLL<br />DLL<br />EXE<br />
    • 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. Managed Extensibility Framework<br />Applications consists of loosely-coupled components that are discovered and composed at runtime<br />
    • 6. Advantages of mef<br />Loose Coupling<br />Swap Classes at Runtime<br />No Recompile or Redeploy<br />Single Plug-In Architecture<br />
    • 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. Demo<br />Using MEF<br />
    • 18. MEF vs Dependency Injection<br />
    • 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. 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. Dave’s Thoughts<br />DavidGiard.com<br />TechnologyAndFriends.com<br />DavidGiard@DavidGiard.com<br />

    ×