SlideShare uma empresa Scribd logo
1 de 21
David Giard MCTS, MCSD, MCSE, MCDBA Principal Consultant, Sogeti www.DavidGiard.com DavidGiard@DavidGiard.com
Managed Extensibility Framework Beta 2
Compile and Deploy Tight Coupling DLL DLL EXE
MEF Loose Coupling with mef Compile and Deploy DLL DLL EXE DLL Contract Contract Contract Contract
Managed Extensibility Framework Applications consists of loosely-coupled components that are discovered and composed at runtime
Advantages of mef Loose Coupling Swap Classes at Runtime No Recompile or Redeploy Single Plug-In Architecture
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
Demo G/L Modules for Accounting app A/R MEFApp (Accounting) GenSetup A/P Export
Existing Extensibility in .Net Visual Studio Add-Ins Microsoft Tools for Office Rules Engines WCF Interfaces Reflection IOC / Dependency Injection
Get Started MEF.CodePlex.com   Download and unzip MEF_Beta_2.zip Zip file contains DLLs Samples Source Code
Developer Steps Set Reference to System.ComponentModel.Composition.dll Contract Import Export Catalogs Composition Import Contracts Export
MEF Contracts [Import(“Contract1”)] String  SomeThing {get; set;} [Export(“Contract1”)] Public string SpecialThing{ Get {return “A Value”}; } “A Value”
MEF Contracts [Import(“Contract1”)] String  SomeThing {get; set;} [Export(“Contract1”)] Public string MoreSpecialThing{ Get {return “A Different Value”}; } “A Different Value”
MEF Interface Contracts [Import(typeof(IFoo))] IFooSomeFoo {get; set;} [Export(typeof(IFoo))] public Foo: IFoo{ … } new Foo()
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()
Composition varcatalog1     = newDirectoryCatalog(@"c:EFmports"); var container = newCompositionContainer catalog1); container.ComposeParts(this); Catalogs TypeCatalog AssemblyCatalog DirectoryCatalog AggregateCatalog PackageCatalog (Silverlight toolkit)
Demo Using MEF
MEF vs  Dependency Injection
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
User Groups Great Lakes Area .Net User Group Southfield, MI migang.org Greater Lansing .Net User Group East Lansing, MI glugnet.org
Dave’s Thoughts DavidGiard.com TechnologyAndFriends.com DavidGiard@DavidGiard.com

Mais conteúdo relacionado

Mais procurados

Software development life cycle
Software development life cycleSoftware development life cycle
Software development life cycle
Kanav Sood
 
Shivani_Sethi__Resume
Shivani_Sethi__ResumeShivani_Sethi__Resume
Shivani_Sethi__Resume
Shivani Sethi
 
[Whitepaper] an overview of ibm mobile first platform
[Whitepaper] an overview of ibm mobile first platform[Whitepaper] an overview of ibm mobile first platform
[Whitepaper] an overview of ibm mobile first platform
gule mariam
 
Ch17-Software Engineering 9
Ch17-Software Engineering 9Ch17-Software Engineering 9
Ch17-Software Engineering 9
Ian Sommerville
 
Sdd Maintenance Of Software Solutions
Sdd Maintenance Of Software SolutionsSdd Maintenance Of Software Solutions
Sdd Maintenance Of Software Solutions
gavhays
 
EMPIRICALLY VALIDATED SIMPLICITY EVALUATION MODEL FOR OBJECT ORIENTED SOFTWARE
EMPIRICALLY VALIDATED SIMPLICITY EVALUATION MODEL FOR OBJECT ORIENTED SOFTWAREEMPIRICALLY VALIDATED SIMPLICITY EVALUATION MODEL FOR OBJECT ORIENTED SOFTWARE
EMPIRICALLY VALIDATED SIMPLICITY EVALUATION MODEL FOR OBJECT ORIENTED SOFTWARE
ijseajournal
 

Mais procurados (20)

Component-based Software Engineering
Component-based Software EngineeringComponent-based Software Engineering
Component-based Software Engineering
 
Software development life cycle
Software development life cycleSoftware development life cycle
Software development life cycle
 
Component Based Software Development
Component Based Software DevelopmentComponent Based Software Development
Component Based Software Development
 
Component Based Testing Using Finite Automata
Component Based Testing Using Finite AutomataComponent Based Testing Using Finite Automata
Component Based Testing Using Finite Automata
 
The benefits of software reuse
The benefits of software reuseThe benefits of software reuse
The benefits of software reuse
 
Shivani_Sethi__Resume
Shivani_Sethi__ResumeShivani_Sethi__Resume
Shivani_Sethi__Resume
 
Adaptation of Single-user Multi-touch Components to Support Synchronous Mobi...
Adaptation of Single-user Multi-touch Components to Support Synchronous Mobi...Adaptation of Single-user Multi-touch Components to Support Synchronous Mobi...
Adaptation of Single-user Multi-touch Components to Support Synchronous Mobi...
 
Your PaaS to DevOps
Your PaaS to DevOpsYour PaaS to DevOps
Your PaaS to DevOps
 
[Whitepaper] an overview of ibm mobile first platform
[Whitepaper] an overview of ibm mobile first platform[Whitepaper] an overview of ibm mobile first platform
[Whitepaper] an overview of ibm mobile first platform
 
Software and software engineering basics by ram k paliwal
Software and software engineering basics by ram k paliwalSoftware and software engineering basics by ram k paliwal
Software and software engineering basics by ram k paliwal
 
Ch17-Software Engineering 9
Ch17-Software Engineering 9Ch17-Software Engineering 9
Ch17-Software Engineering 9
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
 
DevOps Practices in a Nutshell
DevOps Practices in a NutshellDevOps Practices in a Nutshell
DevOps Practices in a Nutshell
 
SWE-401 - 2. Software Development life cycle (SDLC)
SWE-401 - 2. Software Development life cycle (SDLC)SWE-401 - 2. Software Development life cycle (SDLC)
SWE-401 - 2. Software Development life cycle (SDLC)
 
How Virtual Compilation Transforms Static Code Analysis
How Virtual Compilation Transforms Static Code AnalysisHow Virtual Compilation Transforms Static Code Analysis
How Virtual Compilation Transforms Static Code Analysis
 
Software process
Software processSoftware process
Software process
 
Sdd Maintenance Of Software Solutions
Sdd Maintenance Of Software SolutionsSdd Maintenance Of Software Solutions
Sdd Maintenance Of Software Solutions
 
EMPIRICALLY VALIDATED SIMPLICITY EVALUATION MODEL FOR OBJECT ORIENTED SOFTWARE
EMPIRICALLY VALIDATED SIMPLICITY EVALUATION MODEL FOR OBJECT ORIENTED SOFTWAREEMPIRICALLY VALIDATED SIMPLICITY EVALUATION MODEL FOR OBJECT ORIENTED SOFTWARE
EMPIRICALLY VALIDATED SIMPLICITY EVALUATION MODEL FOR OBJECT ORIENTED SOFTWARE
 
Swe notes
Swe notesSwe notes
Swe notes
 
Bhavana Paul
Bhavana PaulBhavana Paul
Bhavana Paul
 

Destaque

Pochoco
PochocoPochoco
Pochoco
gndlf
 
Greenwich Ateb Presentation 21 Oct 2008 Final
Greenwich Ateb Presentation 21 Oct 2008 FinalGreenwich Ateb Presentation 21 Oct 2008 Final
Greenwich Ateb Presentation 21 Oct 2008 Final
rcsmuk
 
Colorado Climate
Colorado ClimateColorado Climate
Colorado Climate
xtina44
 
Workflow Foundation
Workflow FoundationWorkflow Foundation
Workflow Foundation
David Giard
 
GANG Announcements March 2010
GANG Announcements March 2010GANG Announcements March 2010
GANG Announcements March 2010
David Giard
 
Gang announcements 2010 11
Gang announcements 2010 11Gang announcements 2010 11
Gang announcements 2010 11
David Giard
 

Destaque (20)

Scrapbook - Les Ségur
Scrapbook - Les SégurScrapbook - Les Ségur
Scrapbook - Les Ségur
 
Criterios
CriteriosCriterios
Criterios
 
Pochoco
PochocoPochoco
Pochoco
 
Web 3.0
Web 3.0Web 3.0
Web 3.0
 
IntelliKeys USB
IntelliKeys USBIntelliKeys USB
IntelliKeys USB
 
City University Food Thinkers
City University Food ThinkersCity University Food Thinkers
City University Food Thinkers
 
JJMBSIDJournals
JJMBSIDJournalsJJMBSIDJournals
JJMBSIDJournals
 
Gray routes Fall/Autumn Intern Requirements 2013
Gray routes Fall/Autumn Intern Requirements 2013Gray routes Fall/Autumn Intern Requirements 2013
Gray routes Fall/Autumn Intern Requirements 2013
 
Greenwich Ateb Presentation 21 Oct 2008 Final
Greenwich Ateb Presentation 21 Oct 2008 FinalGreenwich Ateb Presentation 21 Oct 2008 Final
Greenwich Ateb Presentation 21 Oct 2008 Final
 
Sist distribucion
Sist distribucionSist distribucion
Sist distribucion
 
FATE2013 Posthaus presentation -- Outdoor Vision Fest, Innovating Collaboration
FATE2013 Posthaus presentation -- Outdoor Vision Fest, Innovating CollaborationFATE2013 Posthaus presentation -- Outdoor Vision Fest, Innovating Collaboration
FATE2013 Posthaus presentation -- Outdoor Vision Fest, Innovating Collaboration
 
Cell Parts
Cell PartsCell Parts
Cell Parts
 
Terry Borst: Credits
Terry Borst: CreditsTerry Borst: Credits
Terry Borst: Credits
 
Colorado Climate
Colorado ClimateColorado Climate
Colorado Climate
 
A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...A Solver Manager for energy systems planning within a Stochastic Optimization...
A Solver Manager for energy systems planning within a Stochastic Optimization...
 
Workflow Foundation
Workflow FoundationWorkflow Foundation
Workflow Foundation
 
Gang announcements 2010 07
Gang announcements 2010 07Gang announcements 2010 07
Gang announcements 2010 07
 
GANG Announcements March 2010
GANG Announcements March 2010GANG Announcements March 2010
GANG Announcements March 2010
 
Gang announcements 2010 11
Gang announcements 2010 11Gang announcements 2010 11
Gang announcements 2010 11
 
Foresites hoardings with map (2)
Foresites hoardings with map (2)Foresites hoardings with map (2)
Foresites hoardings with map (2)
 

Semelhante a Managed Extensibility Framework 2010 01

Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...
SoftServe
 
Gk1051 001 j2-ee_arch_tt425v1.1
Gk1051 001 j2-ee_arch_tt425v1.1Gk1051 001 j2-ee_arch_tt425v1.1
Gk1051 001 j2-ee_arch_tt425v1.1
vciampa
 
J2EEPlatformsandMicrosoft007
J2EEPlatformsandMicrosoft007J2EEPlatformsandMicrosoft007
J2EEPlatformsandMicrosoft007
Jay van Zyl
 
Mdd Lcds
Mdd LcdsMdd Lcds
Mdd Lcds
ravinxg
 
The necessity of a lead person to monitor development stages of the DevOps pi...
The necessity of a lead person to monitor development stages of the DevOps pi...The necessity of a lead person to monitor development stages of the DevOps pi...
The necessity of a lead person to monitor development stages of the DevOps pi...
nooriasukmaningtyas
 
microsoft visual studio .net introduction from ids team
microsoft visual studio .net introduction from ids teammicrosoft visual studio .net introduction from ids team
microsoft visual studio .net introduction from ids team
royaljaiitsolutions
 

Semelhante a Managed Extensibility Framework 2010 01 (20)

Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...
 
Managed Extensibility Framework
Managed Extensibility FrameworkManaged Extensibility Framework
Managed Extensibility Framework
 
Modern Microservices Architecture with Docker
Modern Microservices Architecture with DockerModern Microservices Architecture with Docker
Modern Microservices Architecture with Docker
 
Gk1051 001 j2-ee_arch_tt425v1.1
Gk1051 001 j2-ee_arch_tt425v1.1Gk1051 001 j2-ee_arch_tt425v1.1
Gk1051 001 j2-ee_arch_tt425v1.1
 
Coolgen Shkehar
Coolgen ShkeharCoolgen Shkehar
Coolgen Shkehar
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
What’s new in Rational collaborative lifecycle management 2011?
What’s new in Rational collaborative lifecycle management 2011?What’s new in Rational collaborative lifecycle management 2011?
What’s new in Rational collaborative lifecycle management 2011?
 
Overview
OverviewOverview
Overview
 
Extensibility in application
Extensibility in applicationExtensibility in application
Extensibility in application
 
UrbanCode Deploy course and product overview slides
UrbanCode Deploy course and product overview slidesUrbanCode Deploy course and product overview slides
UrbanCode Deploy course and product overview slides
 
Mdd lcds
Mdd lcdsMdd lcds
Mdd lcds
 
Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)
 
J2EEPlatformsandMicrosoft007
J2EEPlatformsandMicrosoft007J2EEPlatformsandMicrosoft007
J2EEPlatformsandMicrosoft007
 
Mdd Lcds
Mdd LcdsMdd Lcds
Mdd Lcds
 
The necessity of a lead person to monitor development stages of the DevOps pi...
The necessity of a lead person to monitor development stages of the DevOps pi...The necessity of a lead person to monitor development stages of the DevOps pi...
The necessity of a lead person to monitor development stages of the DevOps pi...
 
Extending the Enterprise with MEF
Extending the Enterprise with MEFExtending the Enterprise with MEF
Extending the Enterprise with MEF
 
Best practices for creating modular Web applications
Best practices for creating modular Web applicationsBest practices for creating modular Web applications
Best practices for creating modular Web applications
 
microsoft visual studio .net introduction from ids team
microsoft visual studio .net introduction from ids teammicrosoft visual studio .net introduction from ids team
microsoft visual studio .net introduction from ids team
 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net Developer
 

Mais de David Giard

Mais de David Giard (20)

Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022Data Visualization - CodeMash 2022
Data Visualization - CodeMash 2022
 
Azure data factory
Azure data factoryAzure data factory
Azure data factory
 
Azure functions
Azure functionsAzure functions
Azure functions
 
University of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft AzureUniversity of Texas lecture: Data Science Tools in Microsoft Azure
University of Texas lecture: Data Science Tools in Microsoft Azure
 
University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018University of Texas, Data Science, March 29, 2018
University of Texas, Data Science, March 29, 2018
 
Intro to cloud and azure
Intro to cloud and azureIntro to cloud and azure
Intro to cloud and azure
 
Azure and deep learning
Azure and deep learningAzure and deep learning
Azure and deep learning
 
Azure and Deep Learning
Azure and Deep LearningAzure and Deep Learning
Azure and Deep Learning
 
Custom vision
Custom visionCustom vision
Custom vision
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and roll
 
Own your own career advice from a veteran consultant
Own your own career   advice from a veteran consultantOwn your own career   advice from a veteran consultant
Own your own career advice from a veteran consultant
 
You and Your Tech Community
You and Your Tech CommunityYou and Your Tech Community
You and Your Tech Community
 
Microsoft Azure IoT overview
Microsoft Azure IoT overviewMicrosoft Azure IoT overview
Microsoft Azure IoT overview
 
Cloud and azure and rock and roll
Cloud and azure and rock and rollCloud and azure and rock and roll
Cloud and azure and rock and roll
 
Big Data on azure
Big Data on azureBig Data on azure
Big Data on azure
 
Microsoft azure without microsoft
Microsoft azure without microsoftMicrosoft azure without microsoft
Microsoft azure without microsoft
 
Azure mobile apps
Azure mobile appsAzure mobile apps
Azure mobile apps
 
Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web Services
 
Effective Data Visualization
Effective Data VisualizationEffective Data Visualization
Effective Data Visualization
 
Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScript
 

Último

Último (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Managed Extensibility Framework 2010 01

  • 1. David Giard MCTS, MCSD, MCSE, MCDBA Principal Consultant, Sogeti www.DavidGiard.com DavidGiard@DavidGiard.com
  • 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:EFmports"); var container = newCompositionContainer catalog1); container.ComposeParts(this); Catalogs TypeCatalog AssemblyCatalog DirectoryCatalog AggregateCatalog PackageCatalog (Silverlight toolkit)
  • 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

Notas do Editor

  1. Photo by Andres Rueda: http://www.flickr.com/photos/andresrueda/2983149263/ Creative Common, Attribution-No Derivative