Getting Addicted to MEF A 12 Step Program To Become Addicted to Awesomeness
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.
MEF? Managed Extensibility Framework A framework to simplify building internally and externally compose-able applications Could possibly become the “LINQ” of .Net 4
Current Issues in Extensibility Limited Documentation Complex APIs Reflection Large Inheritance Chains Difficult to Estimate
Step 2: Giving In Easy To Use Easy To Learn Auto-Composition Metadata Custom Contracts Open Source Auto-Discovery Extensible
Step 3: Where to Find MEF Codeplex http://mef.codeplex.com .Net Framework 4
Step 4: Identifying Items
Step 5: Observing the Addition
Step 6: Understanding - Exports Extensions To Be Consumed Export & InheritedExport Attributes PartNotDiscoverable Attr. Different Objects: Properties Methods Classes
Step 6: Understanding - Imports Consumers Extensibility Points Import Attribute ImportMany Attribute Different Objects: Properties Fields Constructor Params
Step 6: Understanding - Catalogs Discovers and Instantiates Exports Used by Containers Multiple Types TypeCatalog AssemblyCatalog DirectoryCatalog AggregateCatalog
Step 7: Observing Further
Step 8: Sharing Information Metadata Used to provide extra information Lazy Instantiation ExportMetadata Attr. Demo
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
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.
Step 10: Identifying Opportunities IoC Container  MVC Controller Factory “ Flashcard” style programs Rules Engines App Themes Workflow Steps Many More
Step 11: Practical Observation
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
My Information James Eggers Email -  [email_address]   Blog -  http://RandomActsOfCoding.Blogspot.Com   Twitter - @JamesEggers

Mef 12 step program

  • 1.
    Getting Addicted toMEF A 12 Step Program To Become Addicted to Awesomeness
  • 2.
    Step 1: AdmittingJames 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 ExtensibilityFramework A framework to simplify building internally and externally compose-able applications Could possibly become the “LINQ” of .Net 4
  • 4.
    Current Issues inExtensibility Limited Documentation Complex APIs Reflection Large Inheritance Chains Difficult to Estimate
  • 5.
    Step 2: GivingIn Easy To Use Easy To Learn Auto-Composition Metadata Custom Contracts Open Source Auto-Discovery Extensible
  • 6.
    Step 3: Whereto Find MEF Codeplex http://mef.codeplex.com .Net Framework 4
  • 7.
  • 8.
    Step 5: Observingthe 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.
  • 13.
    Step 8: SharingInformation Metadata Used to provide extra information Lazy Instantiation ExportMetadata Attr. Demo
  • 14.
    Step 9: SharingExperiences 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: SharingExperiences 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: IdentifyingOpportunities IoC Container MVC Controller Factory “ Flashcard” style programs Rules Engines App Themes Workflow Steps Many More
  • 17.
    Step 11: PracticalObservation
  • 18.
    Step 12: ContinuingEducation 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 JamesEggers Email - [email_address] Blog - http://RandomActsOfCoding.Blogspot.Com Twitter - @JamesEggers