Your SlideShare is downloading. ×
Mef 12 step program
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

Mef 12 step program

1,589
views

Published on

My introductory presentation about using MEF, the Managed Extensibility Framework in .Net

My introductory presentation about using MEF, the Managed Extensibility Framework in .Net


0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,589
On Slideshare
0
From Embeds
0
Number of Embeds
22
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
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

Transcript

  • 1. Getting Addicted to MEF A 12 Step Program To Become Addicted to Awesomeness
  • 2. Step 1: Admitting
    • James Eggers
    • From Kansas City
    • Addicted for about a Year
    • Talk about it on Twitter and my blog.
    • Find Odd Situations to Use It More.
  • 3. MEF?
    • Managed Extensibility Framework
    • A framework to simplify building internally and externally compose-able applications
    • Could possibly become the “LINQ” of .Net 4
  • 4. Current Issues in Extensibility
    • Limited Documentation
    • Complex APIs
    • Reflection
    • Large Inheritance Chains
    • Difficult to Estimate
  • 5. Step 2: Giving In
    • Easy To Use
    • Easy To Learn
    • Auto-Composition
    • Metadata
    • Custom Contracts
    • Open Source
    • Auto-Discovery
    • Extensible
  • 6. Step 3: Where to Find MEF
    • Codeplex http://mef.codeplex.com
    • .Net Framework 4
  • 7. Step 4: Identifying Items
  • 8. Step 5: Observing the Addition
  • 9. Step 6: Understanding - Exports
    • Extensions To Be Consumed
    • Export & InheritedExport Attributes
    • PartNotDiscoverable Attr.
    • Different Objects:
      • Properties
      • Methods
      • Classes
  • 10. Step 6: Understanding - Imports
    • Consumers
    • Extensibility Points
    • Import Attribute
    • ImportMany Attribute
    • Different Objects:
      • Properties
      • Fields
      • Constructor Params
  • 11. Step 6: Understanding - Catalogs
    • Discovers and Instantiates Exports
    • Used by Containers
    • Multiple Types
      • TypeCatalog
      • AssemblyCatalog
      • DirectoryCatalog
      • AggregateCatalog
  • 12. Step 7: Observing Further
  • 13. Step 8: Sharing Information
    • Metadata
      • Used to provide extra information
      • Lazy Instantiation
      • ExportMetadata Attr.
      • Demo
  • 14. Step 9: Sharing Experiences
    • Lessons Learned
      • InheritedExport can cause hide metadata
      • ImportMany to IList<T> has to be instantiated before composition
      • PartNotDiscoverable Attribute doesn't work with TypeCatalogs
  • 15. Step 9: Sharing Experiences
    • Lessons Learned(cont)
      • Stable Composition Can Lead to a lot of Drinking Debugging.
      • Directory Catalog can load multiples if 2 assemblies are found with the same type in said directory.
      • Directory Catalog does not look at child directories.
      • GetCallingAssembly() is great for unit testing part imports.
  • 16. Step 10: Identifying Opportunities
    • IoC Container
    • MVC Controller Factory
    • “ Flashcard” style programs
    • Rules Engines
    • App Themes
    • Workflow Steps
    • Many More
  • 17. Step 11: Practical Observation
  • 18. Step 12: Continuing Education
    • Codeplex - http://mef.codeplex.com
    • MSDN - http://msdn.microsoft.com
    • My Blog - http://RandomActsOfCoding.Blogspot.Com
    • MEF Contrib - http://mefcontrib.codeplex.com
  • 19. My Information
    • James Eggers
    • Email - [email_address]
    • Blog - http://RandomActsOfCoding.Blogspot.Com
    • Twitter - @JamesEggers