SlideShare una empresa de Scribd logo
1 de 23
When MEF meets Silverlight AmrElsehemy amr.elsehemy@me.com 1
Speaker TA at Faculty of Information and Computer Science Ain Shams University Senior Software Engineer at ITWorx MCSD, MCPD + more. 2
What's MEF? The Managed Extensibility Framework “The Managed Extensibility Framework (MEF) is a new library in .NET 4 / Silverlight 4 for building applications that can be incrementally extended” – mef team “An extensible framework for composing applications from a set of loosely-couple parts discovered and evolving at run-time” – mtaulty 3
WhywasMEF built? 4 I need A Put the D Can I have C F E F B A App C G D Add B G Then get me E
Why MEF For customers For you and your team  Always there, always ready In the framework! 5
MEF Basics… 6 An Application is built of parts
Demo Building our thing 7
3 Magic steps  Export it Import it Compose it 8
Export it 9 [Export(typeof(IThing))] publicclassThing { } IThing Export 9
Import it  10 publicclassMainPage {     [Import(typeof(IThing))]     publicIThing thing; } IThing Import 10
Compose it  11 publicclassMainPage { publicMainPage() {             CompositionInitializer.SatisfyImports(this); } Compose 11
Demo Giving more 12
Import it - Metadata 13 [ImportMany] publicIEnumerable<Lazy<IThing, IThingMetadata>> somethings; IThing ImportMany
Export it - Metadata 14 [ExportMetadata("Position", ThingPosition.Left)] [Export(typeof(IThing))] publicpartialclassThing { } Put me in the left IThing Export
Customize it – Custom exports 15 [ThingExport(Position = ThingPosition.Left)]    publicclassThing {} Put me in the left IThing Export 15
Demo Exploring the catalogs 16
TypeCatalog AssemblyCatalog AggregateCatalog Compose it – Catalogs 17
Demo Trim your apps break up your xaps 18
Recomopose- DeploymentCatalog Recomposition is key in Silverlight apps Initial download, small in size. Download more functionality. A special Silverlight catalog DeploymentCatalog. Trace changes with IPartImportsSatisfiedNotification 19
MEF here, there, everywhere Samples 20
MEF versions .NET Framework shipping with Silverlight4 .NET Framework 4 shipping with VS 2010 Silverlight 3 & .NET Framework V3.5 SP1 Source on Codeplex (MSPL) 21
Resources silverlight.net mef.codeplex.com mefcontrib.codeplex.com blogs.msdn.com/gblock mtaulty.com – He is awesome! channel9.msdn.com/tags/learnMEFSL4 22
Questions? 23

Más contenido relacionado

Destacado

shelby and katy.
shelby and katy.shelby and katy.
shelby and katy.12dundsh
 
Teaser Chemic
Teaser   ChemicTeaser   Chemic
Teaser Chemicosp_hyd
 
Crossing barriers
Crossing barriersCrossing barriers
Crossing barriersibaronina
 
Interesting Sights in China
Interesting Sights in ChinaInteresting Sights in China
Interesting Sights in Chinafr3ako
 
Obra pictórica de Antonia Dávalos
Obra pictórica  de Antonia DávalosObra pictórica  de Antonia Dávalos
Obra pictórica de Antonia DávalosLázaro Chávez
 
Walmart The Nation Of Domination WAL mart strategies in china
Walmart The Nation Of Domination WAL mart strategies in chinaWalmart The Nation Of Domination WAL mart strategies in china
Walmart The Nation Of Domination WAL mart strategies in chinaguest86aa80
 
Geographical Position
Geographical Position Geographical Position
Geographical Position ibaronina
 
Centre For Arciteck And Conservation
Centre For Arciteck And ConservationCentre For Arciteck And Conservation
Centre For Arciteck And ConservationTatang Ramlan
 
AlpesJUG - Communautés opensource, stratégies et écueils
AlpesJUG - Communautés opensource, stratégies et écueilsAlpesJUG - Communautés opensource, stratégies et écueils
AlpesJUG - Communautés opensource, stratégies et écueilsjulien.ponge
 
Mengenal Dan Membezakan Warna
Mengenal Dan Membezakan WarnaMengenal Dan Membezakan Warna
Mengenal Dan Membezakan Warnaazirah azizul
 
Pendekatan, Kaedah, Teknik Dan Strategi
Pendekatan, Kaedah, Teknik Dan StrategiPendekatan, Kaedah, Teknik Dan Strategi
Pendekatan, Kaedah, Teknik Dan Strategiazirah azizul
 

Destacado (15)

shelby and katy.
shelby and katy.shelby and katy.
shelby and katy.
 
Presentazione2
Presentazione2Presentazione2
Presentazione2
 
Presentazione2
Presentazione2Presentazione2
Presentazione2
 
Teaser Chemic
Teaser   ChemicTeaser   Chemic
Teaser Chemic
 
Crossing barriers
Crossing barriersCrossing barriers
Crossing barriers
 
Be merge preview
Be merge previewBe merge preview
Be merge preview
 
Interesting Sights in China
Interesting Sights in ChinaInteresting Sights in China
Interesting Sights in China
 
Obra pictórica de Antonia Dávalos
Obra pictórica  de Antonia DávalosObra pictórica  de Antonia Dávalos
Obra pictórica de Antonia Dávalos
 
Walmart The Nation Of Domination WAL mart strategies in china
Walmart The Nation Of Domination WAL mart strategies in chinaWalmart The Nation Of Domination WAL mart strategies in china
Walmart The Nation Of Domination WAL mart strategies in china
 
Geographical Position
Geographical Position Geographical Position
Geographical Position
 
Centre For Arciteck And Conservation
Centre For Arciteck And ConservationCentre For Arciteck And Conservation
Centre For Arciteck And Conservation
 
FOSS - PoitouJUG
FOSS - PoitouJUGFOSS - PoitouJUG
FOSS - PoitouJUG
 
AlpesJUG - Communautés opensource, stratégies et écueils
AlpesJUG - Communautés opensource, stratégies et écueilsAlpesJUG - Communautés opensource, stratégies et écueils
AlpesJUG - Communautés opensource, stratégies et écueils
 
Mengenal Dan Membezakan Warna
Mengenal Dan Membezakan WarnaMengenal Dan Membezakan Warna
Mengenal Dan Membezakan Warna
 
Pendekatan, Kaedah, Teknik Dan Strategi
Pendekatan, Kaedah, Teknik Dan StrategiPendekatan, Kaedah, Teknik Dan Strategi
Pendekatan, Kaedah, Teknik Dan Strategi
 

Similar a When MEF meets Silverlight

NET Event - Migrating WinForm
NET Event - Migrating WinFormNET Event - Migrating WinForm
NET Event - Migrating WinFormRaffaele Garofalo
 
A comparative study of laravel and symfony PHP frameworks
A comparative study of laravel and symfony PHP frameworksA comparative study of laravel and symfony PHP frameworks
A comparative study of laravel and symfony PHP frameworksIJECEIAES
 
Extending the Enterprise with MEF
Extending the Enterprise with MEFExtending the Enterprise with MEF
Extending the Enterprise with MEFBrian Ritchie
 
PHP Frameworks and Symfony
PHP Frameworks and SymfonyPHP Frameworks and Symfony
PHP Frameworks and SymfonyGlenn Guden
 
Erez Hanit's Résumé
Erez Hanit's RésuméErez Hanit's Résumé
Erez Hanit's RésuméErez Hanit
 
What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !Cédric Brun
 
Pre-Con Education: Introduction to Mainframe Academy With CA Technologies
Pre-Con Education: Introduction to Mainframe Academy With CA TechnologiesPre-Con Education: Introduction to Mainframe Academy With CA Technologies
Pre-Con Education: Introduction to Mainframe Academy With CA TechnologiesCA Technologies
 
Ordina SOFTC Presentation - TFS and JAVA, better together
Ordina SOFTC Presentation - TFS and JAVA, better togetherOrdina SOFTC Presentation - TFS and JAVA, better together
Ordina SOFTC Presentation - TFS and JAVA, better togetherOrdina Belgium
 
Fun with ASP.NET MVC 3, MEF and NuGet
Fun with ASP.NET MVC 3, MEF and NuGetFun with ASP.NET MVC 3, MEF and NuGet
Fun with ASP.NET MVC 3, MEF and NuGetMaarten Balliauw
 
The distinct advantages of using PHP-Symfony Framework
The distinct advantages of using PHP-Symfony FrameworkThe distinct advantages of using PHP-Symfony Framework
The distinct advantages of using PHP-Symfony FrameworkMindfire LLC
 
Claromentis Tech RoadMap 2015
Claromentis Tech RoadMap 2015Claromentis Tech RoadMap 2015
Claromentis Tech RoadMap 2015claromentis
 
Clifford nelson resume_16-06
Clifford nelson resume_16-06Clifford nelson resume_16-06
Clifford nelson resume_16-06Clifford Nelson
 
The managed extensibility framework
The managed extensibility frameworkThe managed extensibility framework
The managed extensibility frameworkSpencersSlides
 
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019Elsner Technologies Pvt Ltd
 

Similar a When MEF meets Silverlight (20)

NET Event - Migrating WinForm
NET Event - Migrating WinFormNET Event - Migrating WinForm
NET Event - Migrating WinForm
 
A comparative study of laravel and symfony PHP frameworks
A comparative study of laravel and symfony PHP frameworksA comparative study of laravel and symfony PHP frameworks
A comparative study of laravel and symfony PHP frameworks
 
Extending the Enterprise with MEF
Extending the Enterprise with MEFExtending the Enterprise with MEF
Extending the Enterprise with MEF
 
PHP Frameworks and Symfony
PHP Frameworks and SymfonyPHP Frameworks and Symfony
PHP Frameworks and Symfony
 
Erez Hanit's Résumé
Erez Hanit's RésuméErez Hanit's Résumé
Erez Hanit's Résumé
 
What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !
 
Pre-Con Education: Introduction to Mainframe Academy With CA Technologies
Pre-Con Education: Introduction to Mainframe Academy With CA TechnologiesPre-Con Education: Introduction to Mainframe Academy With CA Technologies
Pre-Con Education: Introduction to Mainframe Academy With CA Technologies
 
Sela Intl Cust Presentation By Brandon Multichannel Mktg
Sela Intl Cust Presentation   By Brandon Multichannel MktgSela Intl Cust Presentation   By Brandon Multichannel Mktg
Sela Intl Cust Presentation By Brandon Multichannel Mktg
 
Sela Intl Cust Presentation By Brandon Multichannel Mktg
Sela Intl Cust Presentation   By Brandon Multichannel MktgSela Intl Cust Presentation   By Brandon Multichannel Mktg
Sela Intl Cust Presentation By Brandon Multichannel Mktg
 
Ordina SOFTC Presentation - TFS and JAVA, better together
Ordina SOFTC Presentation - TFS and JAVA, better togetherOrdina SOFTC Presentation - TFS and JAVA, better together
Ordina SOFTC Presentation - TFS and JAVA, better together
 
Fun with ASP.NET MVC 3, MEF and NuGet
Fun with ASP.NET MVC 3, MEF and NuGetFun with ASP.NET MVC 3, MEF and NuGet
Fun with ASP.NET MVC 3, MEF and NuGet
 
The distinct advantages of using PHP-Symfony Framework
The distinct advantages of using PHP-Symfony FrameworkThe distinct advantages of using PHP-Symfony Framework
The distinct advantages of using PHP-Symfony Framework
 
Jay's CV - 2013
Jay's CV - 2013Jay's CV - 2013
Jay's CV - 2013
 
Claromentis Tech RoadMap 2015
Claromentis Tech RoadMap 2015Claromentis Tech RoadMap 2015
Claromentis Tech RoadMap 2015
 
Morne Maritz CV
Morne Maritz CVMorne Maritz CV
Morne Maritz CV
 
Clifford nelson resume_16-06
Clifford nelson resume_16-06Clifford nelson resume_16-06
Clifford nelson resume_16-06
 
The managed extensibility framework
The managed extensibility frameworkThe managed extensibility framework
The managed extensibility framework
 
Rc2010 mef
Rc2010 mefRc2010 mef
Rc2010 mef
 
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
 
Mohammed-Khairy-Abo-Eleneen
Mohammed-Khairy-Abo-EleneenMohammed-Khairy-Abo-Eleneen
Mohammed-Khairy-Abo-Eleneen
 

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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 Processorsdebabhi2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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?Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
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.pdfUK Journal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

When MEF meets Silverlight

  • 1. When MEF meets Silverlight AmrElsehemy amr.elsehemy@me.com 1
  • 2. Speaker TA at Faculty of Information and Computer Science Ain Shams University Senior Software Engineer at ITWorx MCSD, MCPD + more. 2
  • 3. What's MEF? The Managed Extensibility Framework “The Managed Extensibility Framework (MEF) is a new library in .NET 4 / Silverlight 4 for building applications that can be incrementally extended” – mef team “An extensible framework for composing applications from a set of loosely-couple parts discovered and evolving at run-time” – mtaulty 3
  • 4. WhywasMEF built? 4 I need A Put the D Can I have C F E F B A App C G D Add B G Then get me E
  • 5. Why MEF For customers For you and your team Always there, always ready In the framework! 5
  • 6. MEF Basics… 6 An Application is built of parts
  • 8. 3 Magic steps Export it Import it Compose it 8
  • 9. Export it 9 [Export(typeof(IThing))] publicclassThing { } IThing Export 9
  • 10. Import it 10 publicclassMainPage { [Import(typeof(IThing))] publicIThing thing; } IThing Import 10
  • 11. Compose it 11 publicclassMainPage { publicMainPage() { CompositionInitializer.SatisfyImports(this); } Compose 11
  • 13. Import it - Metadata 13 [ImportMany] publicIEnumerable<Lazy<IThing, IThingMetadata>> somethings; IThing ImportMany
  • 14. Export it - Metadata 14 [ExportMetadata("Position", ThingPosition.Left)] [Export(typeof(IThing))] publicpartialclassThing { } Put me in the left IThing Export
  • 15. Customize it – Custom exports 15 [ThingExport(Position = ThingPosition.Left)] publicclassThing {} Put me in the left IThing Export 15
  • 16. Demo Exploring the catalogs 16
  • 17. TypeCatalog AssemblyCatalog AggregateCatalog Compose it – Catalogs 17
  • 18. Demo Trim your apps break up your xaps 18
  • 19. Recomopose- DeploymentCatalog Recomposition is key in Silverlight apps Initial download, small in size. Download more functionality. A special Silverlight catalog DeploymentCatalog. Trace changes with IPartImportsSatisfiedNotification 19
  • 20. MEF here, there, everywhere Samples 20
  • 21. MEF versions .NET Framework shipping with Silverlight4 .NET Framework 4 shipping with VS 2010 Silverlight 3 & .NET Framework V3.5 SP1 Source on Codeplex (MSPL) 21
  • 22. Resources silverlight.net mef.codeplex.com mefcontrib.codeplex.com blogs.msdn.com/gblock mtaulty.com – He is awesome! channel9.msdn.com/tags/learnMEFSL4 22
  • 24.

Notas del editor

  1. Senior Software at ITWorxTeaching Assistant and pursing Masters at FCISHaving around 17 MS certsHave a blog at
  2. 1- Create the app (SL4)2- Create the UI3- Import a Widget4- Export a Widget5- Compose the container.
  3. 1- Add a second widget2- Introduce ImportingMany3- Show Lazy4- ExportMetadata5- Custom exports
  4. - Say about the choices (Import/Export combination)- How MEF decides to match Export:ContractNameSharedMetadataContractNameCardinalitySharedRecomposableMetadata
  5. Container , that has some catalogs which are places where MEF asks how to find matchesAdd an assembly catalog, built in catalog
  6. 1- Refactor Things.Extensions2- Make the Allow Recomposible
  7. Not just support features extensibilty, but also as a silverlight application everytimexaps are downloaded you try to cut off download size