Your SlideShare is downloading. ×
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,387

Published on

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

No Downloads
Views
Total Views
2,387
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
      MCTS, MCSD, MCSE, MCDBA
      Principal Consultant, Sogeti
      www.DavidGiard.com
      DavidGiard@DavidGiard.com
    • 2. Managed Extensibility Framework
      Beta 2
    • 3. Compile and Deploy
      Tight Coupling
      DLL
      DLL
      EXE
    • 4. MEF
      Loose Coupling with mef
      Compile and Deploy
      DLL
      DLL
      EXE
      DLL
      Contract
      Contract
      Contract
      Contract
    • 5. Managed Extensibility Framework
      Applications consists of loosely-coupled components that are discovered and composed at runtime
    • 6. Advantages of mef
      Loose Coupling
      Swap Classes at Runtime
      No Recompile or Redeploy
      Single Plug-In Architecture
    • 7. MEF Usage Scenarios
      Empower developers to extend your application without modifying it
      Provide extra modules to your application, as needed
      Use MEF as an platform ecosystem to manage all parts of your application
    • 8. Demo
      G/L
      Modules for Accounting app
      A/R
      MEFApp
      (Accounting)
      GenSetup
      A/P
      Export
    • 9. Existing Extensibility in .Net
      Visual Studio Add-Ins
      Microsoft Tools for Office
      Rules Engines
      WCF
      Interfaces
      Reflection
      IOC / Dependency Injection
    • 10. Get Started
      MEF.CodePlex.com
      Download and unzip MEF_Beta_2.zip
      Zip file contains
      DLLs
      Samples
      Source Code
    • 11. Developer Steps
      Set Reference to System.ComponentModel.Composition.dll
      Contract
      Import
      Export
      Catalogs
      Composition
      Import
      Contracts
      Export
    • 12. MEF
      Contracts
      [Import(“Contract1”)]
      String SomeThing {get; set;}
      [Export(“Contract1”)]
      Public string SpecialThing{
      Get {return “A Value”};
      }
      “A Value”
    • 13. MEF
      Contracts
      [Import(“Contract1”)]
      String SomeThing {get; set;}
      [Export(“Contract1”)]
      Public string MoreSpecialThing{
      Get {return “A Different Value”};
      }
      “A Different Value”
    • 14. MEF
      Interface Contracts
      [Import(typeof(IFoo))]
      IFooSomeFoo {get; set;}
      [Export(typeof(IFoo))]
      public Foo: IFoo{

      }
      new Foo()
    • 15. MEF
      Interface Contracts
      [Export(typeof(IFoo))]
      public Foo1: IFoo{

      }
      [ImportMany(typeof(IFoo))]
      List<IFoo> BunchOfFoos{get; set;}
      new Foo1()
      [Export(typeof(IFoo))]
      public Foo2: IFoo{

      }
      new Foo2()
    • 16. Composition
      varcatalog1 = newDirectoryCatalog(@"c:MEFImports");
      var container = newCompositionContainer
      catalog1);
      container.ComposeParts(this);
      Catalogs
      TypeCatalog
      AssemblyCatalog
      DirectoryCatalog
      AggregateCatalog
      PackageCatalog (Silverlight toolkit)
    • 17. Demo
      Using MEF
    • 18. MEF vs Dependency Injection
    • 19. rESOURCES
      http://MEF.codeplex.com
      http://www.davidgiard.com
      http://msmvps.com/blogs/kathleen
      http://blogs.msdn.com/gblock
      http://tinyurl.com/TaultyMEFSilverlightVideos
      NPlus1.org
      David Giard, MCTS, MCSD, MCSE, MCDBA
      www.DavidGiard.com
      DavidGiard@DavidGiard.com
    • 20. User Groups
      Great Lakes Area .Net User Group
      Southfield, MI
      migang.org
      Greater Lansing .Net User Group
      East Lansing, MI
      glugnet.org
    • 21. Dave’s Thoughts
      DavidGiard.com
      TechnologyAndFriends.com
      DavidGiard@DavidGiard.com

    ×