Managed Extensibility Framework 2010 01
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,290
On Slideshare
2,779
From Embeds
511
Number of Embeds
6

Actions

Shares
Downloads
28
Comments
0
Likes
2

Embeds 511

http://www.davidgiard.com 497
http://www.slideshare.net 10
http://131.253.14.250 1
http://webcache.googleusercontent.com 1
http://translate.googleusercontent.com 1
http://davidgiard.com 1

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