Managed Extensibility Framework

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Managed Extensibility Framework - Presentation Transcript

      • David Giard MCTS, MCSD, MCSE, MCDBA Principal Consultant, Sogeti
        • www.DavidGiard.com
        • [email_address]
    1. Preview 2
      • Add classes at runtime
      • Determine at runtime which classes to add
      • Add classes at runtime
        • Code to interfaces
      • Determine at runtime which classes to add
        • Reflection
      • Advantages
        • Declare only class signatures
        • Change which classes are used
      • Disadvantage
        • Need to reference assemblies containing classes
        • Need to recompile if assemblies change
      • Advantages
        • Read class metadata at runtime
        • Make runtime decisions based on that metadata
      • Disadvantage
        • Need to load a class into memory in order to reflect on it
      • Add assemblies after compile?
      • Read metadata without loading classes
      • aka “MEF”
      • Provide extra modules to your application, as needed
      • Empower developers to extend your application without modifying it
      • http://www.codeplex.com/MEF
      • Download and unzip MEF_Preview_2_Refresh.zip
      • Zip file contains
        • Samples
        • Source Code
        • DLLs
      • Build Extension
      • Create Extensible Application
      • Set Reference to System.ComponentModel.Composition.dll
      Extensions Application
      • Class Library
      • Reference System.ComponentModel.Composition.dll
      • using System.ComponentModel.Composition;
      • [Export] attribute on class or property
      • Metadata attributes on class or property
      • Reference System.ComponentModel.Composition.dll
      • using System.ComponentModel.Composition;
      • Add “Hooks”
      Application
      • [Import] attribute on property, or
      • Code
        • CompositionContainer container = new CompositionContainer (catalog.CreateResolver());
        • Catalog can be
          • AttributedAssemblyPartCatalog
          • DirectoryPartCatalog
          • AggregatingComposablePartCatalog
      • Using MEF
      • Modules for Accounting app
      Extensions MEFApp (Accounting) G/L A/R A/P Gen Setup
      • No recompile / redeploy
      • No references set
      • Extend app at runtime
      • Examine metadata without loading
      • http://www.codeplex.com/MEF
      David Giard, MCTS, MCSD, MCSE, MCDBA www.DavidGiard.com [email_address]

    + David GiardDavid Giard, 2 years ago

    custom

    557 views, 1 favs, 1 embeds more stats

    Extend .Net applications with the Managed Extensibi more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 557
      • 540 on SlideShare
      • 17 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 13
    Most viewed embeds
    • 17 views on http://www.davidgiard.com

    more

    All embeds
    • 17 views on http://www.davidgiard.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags