SlideShare uma empresa Scribd logo
1 de 35
Building Extensible Rich Internet Applications with the Managed Extensibility Framework Glenn Block Program Manager Microsoft Corporation
What we’ll cover
RIA Extensions, add-ins, and plugins oh my!
Extensibility implants
Turning fat apps into slimmer apps
Reality RIA 1.0
Reality We need….. We need….. We need….. We need….. K We need….. F A E We need….. J I D RIA 1.0 C B H G We need….. We need….. We need…. We need….
Managed Extensibility Framework The Managed Extensibility Framework (MEF) is a new library in Silverlight 4 for building applications that can be incrementally extended. For customers For you and your team  Always there, always ready
MEF Basics… An Application is built ofparts.
Hello MEF in Silverlight Demo
MEF Basics… Export it. Import it. Composeit.
Export it. [Export(typeof(UserControl))] public class Widget1 : UserControl { 	public string Message { 	     get{return(string) Button.Content;}                     set{Button.Content=value;}                } } Widget1 UserControl Export
Import it. [Export(typeof(UserControl))] public class Widget1 : UserControl { 	[Import] 	public string Message { 	     get{return(string) Button.Content;}                     set{Button.Content=value;}                } } Widget1 String Import
Import it. [Export(typeof(UserControl))] public class Widget1 : UserControl { 	[Import(“HelloMEF.Message”)] 	public string Message { 	     get{return(string) Button.Content;}                     set{Button.Content=value;}                } } Widget1 “HelloMEF.Message” Import
Import it. [Export(typeof(UserControl))] public class MainPage: UserControl { 	[ImportMany(typeof(UserControl))] 	public IEnumerable<UserControl> { get;set; 	} } Main Page UserControl ImportMany
Compose it. PartIntializer: “Compose yourself”  public MainPage()  { InitializeComponent(); PartInitializer.SatisfyImports(this);  } MainPage Compose
Be different – Use metadata
Where does the widget go? Widget Widget
Export it - Metadata [ExportMetadata(“Location”,Location.Top)] [Export(typeof(UserControl))] public class Widget1 : UserControl { 	public string Message { 	     get{return(string) Button.Content;}                     set{Button.Content=value;}                } } Widget1 Put me in the top UserControl Export
Import it - Metadata [Export(typeof(UserControl))] public class MainPage: UserControl { 	[ImportMany(typeof(UserControl))] 	public IEnumerable<Lazy<UserControl, IWidgetMetadata>  	{ get;set; 	} } Main Page UserControl ImportMany
Have it your way! – Custom Exports
Export it - Metadata [ExportMetadata(“Location”,Location.Top)] [Export(typeof(UserControl))] public class Widget1 : UserControl { 	public string Message { 	     get{return(string) Button.Content;}                     set{Button.Content=value;}                } } Widget1 Put me in the top UserControl Export
Customize it – Custom exports [Widget(Location=Location.Top)] public class Widget1 : UserControl { 	public string Message { 	     get{return(string) Button.Content;}                     set{Button.Content=value;}                } } Widget1 Put me in the top UserControl Export
Putting it all together Demo
Trim up your apps	break up your XAPs Demo
MEF and Prism Ariel Ben-Horesh arielb@sela.co.il blogs.microsoft.co.il/blogs/arielbh Developer Sela Group partner
Introducing MEF-Prism integration Our Goal :  Enable an existing Prism application to be further extended through MEF Enabled MEF modules to be added dynamically on the fly. Enable MEF discovered components to be registered in IoC container (Such as Unity).
Introducing MEF-Prism integration Prism application starts and loads up known modules. Module Loader
Introducing MEF-Prism integration Prism application can load unknownplugins, by using MEF as an abstraction layer. 1. Plugins are located and added to a MEF catalog. Server
Introducing MEF-Prism integration Prism application can load unknownplugins, by using MEF as an abstraction layer. 2. Plugins register dependencies with current IoC container. Server
Introducing MEF-Prism integration Prism application can load unknownplugins, by using MEF as an abstraction layer. 3. Plugins are activated. Dependencies are injected. Server
Where can I get it? MEF ships in Silverlight 4.0 Dynamic XAP support in SL 4.0 Toolkit Silverlight 3.0 support on Codeplex MEF source ships under MSPL Learn more: 	Silverlight.net MEF.Codeplex.com MEFContrib.Codeplex.com – Prism/MEF 	blogs.msdn.com/gblock
MEF Cross-platform(s) Jackson Harper jackson@novell.com blog.MonoOnTheWeb.info Software Engineer Moonlight Project partner
Building Extensible RIAs with MEF

Mais conteúdo relacionado

Mais procurados

How to commit a project in svn using svn plugin in anypoint studio
How to commit a project in svn using svn plugin in anypoint studioHow to commit a project in svn using svn plugin in anypoint studio
How to commit a project in svn using svn plugin in anypoint studioSudha Ch
 
Deployment options for mule applications
Deployment options for mule applicationsDeployment options for mule applications
Deployment options for mule applicationssivachandra mandalapu
 
JUnit and MUnit Set Up In Anypoint Studio
JUnit and MUnit Set Up In Anypoint StudioJUnit and MUnit Set Up In Anypoint Studio
JUnit and MUnit Set Up In Anypoint StudioSudha Ch
 
Integration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESBIntegration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESBSanjeet Pandey
 
Mule: Munit domain support
Mule: Munit domain supportMule: Munit domain support
Mule: Munit domain supportShanky Gupta
 
Debugging mule
Debugging   muleDebugging   mule
Debugging muleSindhu VL
 
Mule managing cloud hub
Mule  managing cloud hubMule  managing cloud hub
Mule managing cloud hubD.Rajesh Kumar
 
Git hub plugin setup and working with Git hub on anypoint studio
Git hub plugin setup and working with Git hub on anypoint studioGit hub plugin setup and working with Git hub on anypoint studio
Git hub plugin setup and working with Git hub on anypoint studioSudha Ch
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudiojaveed_mhd
 
Eclipse plug in mylyn & tasktop
Eclipse plug in mylyn & tasktopEclipse plug in mylyn & tasktop
Eclipse plug in mylyn & tasktopRoger Xia
 
Parallel programming c++ win10 msmpi visual studio
Parallel programming c++ win10 msmpi visual studioParallel programming c++ win10 msmpi visual studio
Parallel programming c++ win10 msmpi visual studiopraveench1888
 
Mule cloud hub console overview
Mule   cloud hub console overviewMule   cloud hub console overview
Mule cloud hub console overviewcharan teja R
 
Mule legacy modernization example
Mule legacy modernization exampleMule legacy modernization example
Mule legacy modernization exampleD.Rajesh Kumar
 

Mais procurados (18)

Cloud hub deployment
Cloud hub deploymentCloud hub deployment
Cloud hub deployment
 
How to commit a project in svn using svn plugin in anypoint studio
How to commit a project in svn using svn plugin in anypoint studioHow to commit a project in svn using svn plugin in anypoint studio
How to commit a project in svn using svn plugin in anypoint studio
 
Appcelerator Acquires Aptana
Appcelerator Acquires Aptana Appcelerator Acquires Aptana
Appcelerator Acquires Aptana
 
Deployment options for mule applications
Deployment options for mule applicationsDeployment options for mule applications
Deployment options for mule applications
 
JUnit and MUnit Set Up In Anypoint Studio
JUnit and MUnit Set Up In Anypoint StudioJUnit and MUnit Set Up In Anypoint Studio
JUnit and MUnit Set Up In Anypoint Studio
 
Integration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESBIntegration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESB
 
Mule: Munit domain support
Mule: Munit domain supportMule: Munit domain support
Mule: Munit domain support
 
Debugging mule
Debugging   muleDebugging   mule
Debugging mule
 
Installing the java sdk
Installing the java sdkInstalling the java sdk
Installing the java sdk
 
Mule managing cloud hub
Mule  managing cloud hubMule  managing cloud hub
Mule managing cloud hub
 
Mule
MuleMule
Mule
 
Git hub plugin setup and working with Git hub on anypoint studio
Git hub plugin setup and working with Git hub on anypoint studioGit hub plugin setup and working with Git hub on anypoint studio
Git hub plugin setup and working with Git hub on anypoint studio
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudio
 
Eclipse plug in mylyn & tasktop
Eclipse plug in mylyn & tasktopEclipse plug in mylyn & tasktop
Eclipse plug in mylyn & tasktop
 
Parallel programming c++ win10 msmpi visual studio
Parallel programming c++ win10 msmpi visual studioParallel programming c++ win10 msmpi visual studio
Parallel programming c++ win10 msmpi visual studio
 
Angular 9 New features
Angular 9 New featuresAngular 9 New features
Angular 9 New features
 
Mule cloud hub console overview
Mule   cloud hub console overviewMule   cloud hub console overview
Mule cloud hub console overview
 
Mule legacy modernization example
Mule legacy modernization exampleMule legacy modernization example
Mule legacy modernization example
 

Destaque

MEFilicious Applications
MEFilicious ApplicationsMEFilicious Applications
MEFilicious Applicationsbuildmaster
 
Extensibility in application
Extensibility in applicationExtensibility in application
Extensibility in applicationAbhishek Sur
 
Open.up.your.applications.with.MEF
Open.up.your.applications.with.MEFOpen.up.your.applications.with.MEF
Open.up.your.applications.with.MEFguestcb74eee
 
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01David Giard
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 

Destaque (6)

MEFilicious Applications
MEFilicious ApplicationsMEFilicious Applications
MEFilicious Applications
 
Extensibility in application
Extensibility in applicationExtensibility in application
Extensibility in application
 
Open.up.your.applications.with.MEF
Open.up.your.applications.with.MEFOpen.up.your.applications.with.MEF
Open.up.your.applications.with.MEF
 
MEF briefing
MEF briefingMEF briefing
MEF briefing
 
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Semelhante a Building Extensible RIAs with MEF

Extending the Enterprise with MEF
Extending the Enterprise with MEFExtending the Enterprise with MEF
Extending the Enterprise with MEFBrian Ritchie
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnetrainynovember12
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend DevelopersSergio Nakamura
 
Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...naseeb20
 
Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Chinmoy Mohanty
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Mikkel Flindt Heisterberg
 
React Basic and Advance || React Basic
React Basic and Advance   || React BasicReact Basic and Advance   || React Basic
React Basic and Advance || React Basicrafaqathussainc077
 
Guice tutorial
Guice tutorialGuice tutorial
Guice tutorialAnh Quân
 
MAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationMAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationrtretola
 
22Flutter.pdf
22Flutter.pdf22Flutter.pdf
22Flutter.pdfdbaman
 
Visual Studio Automation Object Model. EnvDTE interfaces
Visual Studio Automation Object Model. EnvDTE interfacesVisual Studio Automation Object Model. EnvDTE interfaces
Visual Studio Automation Object Model. EnvDTE interfacesPVS-Studio
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyTim Pettersen
 
Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Mohamed Meligy
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 serversMark Myers
 

Semelhante a Building Extensible RIAs with MEF (20)

Extending the Enterprise with MEF
Extending the Enterprise with MEFExtending the Enterprise with MEF
Extending the Enterprise with MEF
 
Meteor
MeteorMeteor
Meteor
 
Cloud Messaging Flutter
Cloud Messaging FlutterCloud Messaging Flutter
Cloud Messaging Flutter
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnet
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend Developers
 
Xebia deploy it
Xebia deploy itXebia deploy it
Xebia deploy it
 
Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...Implementation of Push Notification in React Native Android app using Firebas...
Implementation of Push Notification in React Native Android app using Firebas...
 
Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
OnTime Partner Webinar September 2011
OnTime Partner Webinar September 2011OnTime Partner Webinar September 2011
OnTime Partner Webinar September 2011
 
React Basic and Advance || React Basic
React Basic and Advance   || React BasicReact Basic and Advance   || React Basic
React Basic and Advance || React Basic
 
Google GIN
Google GINGoogle GIN
Google GIN
 
Guice tutorial
Guice tutorialGuice tutorial
Guice tutorial
 
MAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationMAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR application
 
22Flutter.pdf
22Flutter.pdf22Flutter.pdf
22Flutter.pdf
 
Visual Studio Automation Object Model. EnvDTE interfaces
Visual Studio Automation Object Model. EnvDTE interfacesVisual Studio Automation Object Model. EnvDTE interfaces
Visual Studio Automation Object Model. EnvDTE interfaces
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
 
Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 

Mais de Glenn Block

Api Strat Portland 2017 Serverless Extensibility talk
Api Strat Portland 2017 Serverless Extensibility talkApi Strat Portland 2017 Serverless Extensibility talk
Api Strat Portland 2017 Serverless Extensibility talkGlenn Block
 
Serverless Extensibility
Serverless ExtensibilityServerless Extensibility
Serverless ExtensibilityGlenn Block
 
Deploying web apis on core clr to docker
Deploying web apis on core clr to dockerDeploying web apis on core clr to docker
Deploying web apis on core clr to dockerGlenn Block
 
HTTP Event Collector, Simplified Developer Logging
HTTP Event Collector, Simplified Developer LoggingHTTP Event Collector, Simplified Developer Logging
HTTP Event Collector, Simplified Developer LoggingGlenn Block
 
Liberate your Application Logging
Liberate your Application LoggingLiberate your Application Logging
Liberate your Application LoggingGlenn Block
 
A Lap Around Developer Awesomeness in Splunk 6.3
A Lap Around Developer Awesomeness in Splunk 6.3A Lap Around Developer Awesomeness in Splunk 6.3
A Lap Around Developer Awesomeness in Splunk 6.3Glenn Block
 
Islands of Node in a sea of big data
Islands of Node in a sea of big dataIslands of Node in a sea of big data
Islands of Node in a sea of big dataGlenn Block
 
Splunk, a smorgasboard for developing big data solutions
Splunk, a smorgasboard for developing big data solutions Splunk, a smorgasboard for developing big data solutions
Splunk, a smorgasboard for developing big data solutions Glenn Block
 
Splunk's api how we built it
Splunk's api   how we built itSplunk's api   how we built it
Splunk's api how we built itGlenn Block
 
Splunk for net developers
Splunk for net developersSplunk for net developers
Splunk for net developersGlenn Block
 
Dev sum hypemedia talk
Dev sum hypemedia talkDev sum hypemedia talk
Dev sum hypemedia talkGlenn Block
 
Getting your head around big data
Getting your head around big dataGetting your head around big data
Getting your head around big dataGlenn Block
 
Realtime Conf - Lightning node.js dev
Realtime Conf - Lightning node.js devRealtime Conf - Lightning node.js dev
Realtime Conf - Lightning node.js devGlenn Block
 
Node js - Enterprise Class
Node js - Enterprise ClassNode js - Enterprise Class
Node js - Enterprise ClassGlenn Block
 
Node js on Windows Azure
Node js on Windows AzureNode js on Windows Azure
Node js on Windows AzureGlenn Block
 
Building systems with rest
Building systems with restBuilding systems with rest
Building systems with restGlenn Block
 

Mais de Glenn Block (19)

Api Strat Portland 2017 Serverless Extensibility talk
Api Strat Portland 2017 Serverless Extensibility talkApi Strat Portland 2017 Serverless Extensibility talk
Api Strat Portland 2017 Serverless Extensibility talk
 
Serverless Extensibility
Serverless ExtensibilityServerless Extensibility
Serverless Extensibility
 
Deploying web apis on core clr to docker
Deploying web apis on core clr to dockerDeploying web apis on core clr to docker
Deploying web apis on core clr to docker
 
HTTP Event Collector, Simplified Developer Logging
HTTP Event Collector, Simplified Developer LoggingHTTP Event Collector, Simplified Developer Logging
HTTP Event Collector, Simplified Developer Logging
 
Liberate your Application Logging
Liberate your Application LoggingLiberate your Application Logging
Liberate your Application Logging
 
A Lap Around Developer Awesomeness in Splunk 6.3
A Lap Around Developer Awesomeness in Splunk 6.3A Lap Around Developer Awesomeness in Splunk 6.3
A Lap Around Developer Awesomeness in Splunk 6.3
 
Islands of Node in a sea of big data
Islands of Node in a sea of big dataIslands of Node in a sea of big data
Islands of Node in a sea of big data
 
Splunk and node
Splunk and nodeSplunk and node
Splunk and node
 
Splunk, a smorgasboard for developing big data solutions
Splunk, a smorgasboard for developing big data solutions Splunk, a smorgasboard for developing big data solutions
Splunk, a smorgasboard for developing big data solutions
 
Splunk's api how we built it
Splunk's api   how we built itSplunk's api   how we built it
Splunk's api how we built it
 
Splunk for net developers
Splunk for net developersSplunk for net developers
Splunk for net developers
 
Dev sum hypemedia talk
Dev sum hypemedia talkDev sum hypemedia talk
Dev sum hypemedia talk
 
Getting your head around big data
Getting your head around big dataGetting your head around big data
Getting your head around big data
 
Edge
EdgeEdge
Edge
 
Hypermedia
HypermediaHypermedia
Hypermedia
 
Realtime Conf - Lightning node.js dev
Realtime Conf - Lightning node.js devRealtime Conf - Lightning node.js dev
Realtime Conf - Lightning node.js dev
 
Node js - Enterprise Class
Node js - Enterprise ClassNode js - Enterprise Class
Node js - Enterprise Class
 
Node js on Windows Azure
Node js on Windows AzureNode js on Windows Azure
Node js on Windows Azure
 
Building systems with rest
Building systems with restBuilding systems with rest
Building systems with rest
 

Último

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
[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
 
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 2024The Digital Insurer
 
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 RobisonAnna Loughnan Colquhoun
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
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 WorkerThousandEyes
 
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
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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
 
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
 

Último (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
[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
 
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
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
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
 
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...
 
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...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
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
 

Building Extensible RIAs with MEF

  • 1.
  • 2. Building Extensible Rich Internet Applications with the Managed Extensibility Framework Glenn Block Program Manager Microsoft Corporation
  • 4. RIA Extensions, add-ins, and plugins oh my!
  • 6. Turning fat apps into slimmer apps
  • 8. Reality We need….. We need….. We need….. We need….. K We need….. F A E We need….. J I D RIA 1.0 C B H G We need….. We need….. We need…. We need….
  • 9. Managed Extensibility Framework The Managed Extensibility Framework (MEF) is a new library in Silverlight 4 for building applications that can be incrementally extended. For customers For you and your team Always there, always ready
  • 10. MEF Basics… An Application is built ofparts.
  • 11. Hello MEF in Silverlight Demo
  • 12. MEF Basics… Export it. Import it. Composeit.
  • 13. Export it. [Export(typeof(UserControl))] public class Widget1 : UserControl { public string Message { get{return(string) Button.Content;} set{Button.Content=value;} } } Widget1 UserControl Export
  • 14. Import it. [Export(typeof(UserControl))] public class Widget1 : UserControl { [Import] public string Message { get{return(string) Button.Content;} set{Button.Content=value;} } } Widget1 String Import
  • 15. Import it. [Export(typeof(UserControl))] public class Widget1 : UserControl { [Import(“HelloMEF.Message”)] public string Message { get{return(string) Button.Content;} set{Button.Content=value;} } } Widget1 “HelloMEF.Message” Import
  • 16. Import it. [Export(typeof(UserControl))] public class MainPage: UserControl { [ImportMany(typeof(UserControl))] public IEnumerable<UserControl> { get;set; } } Main Page UserControl ImportMany
  • 17. Compose it. PartIntializer: “Compose yourself” public MainPage() { InitializeComponent(); PartInitializer.SatisfyImports(this); } MainPage Compose
  • 18. Be different – Use metadata
  • 19. Where does the widget go? Widget Widget
  • 20. Export it - Metadata [ExportMetadata(“Location”,Location.Top)] [Export(typeof(UserControl))] public class Widget1 : UserControl { public string Message { get{return(string) Button.Content;} set{Button.Content=value;} } } Widget1 Put me in the top UserControl Export
  • 21. Import it - Metadata [Export(typeof(UserControl))] public class MainPage: UserControl { [ImportMany(typeof(UserControl))] public IEnumerable<Lazy<UserControl, IWidgetMetadata> { get;set; } } Main Page UserControl ImportMany
  • 22. Have it your way! – Custom Exports
  • 23. Export it - Metadata [ExportMetadata(“Location”,Location.Top)] [Export(typeof(UserControl))] public class Widget1 : UserControl { public string Message { get{return(string) Button.Content;} set{Button.Content=value;} } } Widget1 Put me in the top UserControl Export
  • 24. Customize it – Custom exports [Widget(Location=Location.Top)] public class Widget1 : UserControl { public string Message { get{return(string) Button.Content;} set{Button.Content=value;} } } Widget1 Put me in the top UserControl Export
  • 25. Putting it all together Demo
  • 26. Trim up your apps break up your XAPs Demo
  • 27. MEF and Prism Ariel Ben-Horesh arielb@sela.co.il blogs.microsoft.co.il/blogs/arielbh Developer Sela Group partner
  • 28. Introducing MEF-Prism integration Our Goal : Enable an existing Prism application to be further extended through MEF Enabled MEF modules to be added dynamically on the fly. Enable MEF discovered components to be registered in IoC container (Such as Unity).
  • 29. Introducing MEF-Prism integration Prism application starts and loads up known modules. Module Loader
  • 30. Introducing MEF-Prism integration Prism application can load unknownplugins, by using MEF as an abstraction layer. 1. Plugins are located and added to a MEF catalog. Server
  • 31. Introducing MEF-Prism integration Prism application can load unknownplugins, by using MEF as an abstraction layer. 2. Plugins register dependencies with current IoC container. Server
  • 32. Introducing MEF-Prism integration Prism application can load unknownplugins, by using MEF as an abstraction layer. 3. Plugins are activated. Dependencies are injected. Server
  • 33. Where can I get it? MEF ships in Silverlight 4.0 Dynamic XAP support in SL 4.0 Toolkit Silverlight 3.0 support on Codeplex MEF source ships under MSPL Learn more: Silverlight.net MEF.Codeplex.com MEFContrib.Codeplex.com – Prism/MEF blogs.msdn.com/gblock
  • 34. MEF Cross-platform(s) Jackson Harper jackson@novell.com blog.MonoOnTheWeb.info Software Engineer Moonlight Project partner

Notas do Editor

  1. http://www.flickr.com/photos/dawnzy/3047246014/
  2. http://www.flickr.com/photos/smcdevitt/3046557005/
  3. http://www.flickr.com/photos/gangie/1189047644/
  4. MESSAGING:New Library = just an assembly, a normal .dll, used by any .NET languageDynamically Composed = composition takes place at runtime and composition behavior differs depending on how it is configured.In making applications dynamically composed, MEF allows you to build systems that adhere to this “Open/Closed principle, in other words it makes it easy to design systems which can adapt to change.But MEF goes further than simply allow you to extend your own system, it provides a means to allow third parties to extend the application after it has been deployed.
  5. There are really three concepts you need to understand with MEFExport It – Components (we call them Parts) provide capabilities to other parts called Exports. To Export you decorate your class with an Export attribute essentially saying, “Here I am providing this”Import It – To use the capabilities of another part, you Import it. To import your decorate a property on your part with an Import attribute which means “I need this”Compose It – The last step is putting the pieces together. The container (CompositionContainer) is responsible for that job. We’ll see how that works soon.
  6. MESSAGING:Now in the case of Exports, exports are contracts a part offers to other parts. In the case of our DiscountRule, we are exporting ourself as an IRule. This is done very easily by decorating our class with an Export class and specifying that we would like to export ourselves specifically as an IRule (it’s important to note, that if you left out “typeof(IRule)”, the class would be exported as a DiscountRule instead (so other parts importing IRule would not find us)).Once again, very simple. Decorate with an Export attribute and MEF has all the information it needs for this specific part.
  7. MESSAGING:In the case of our DiscountRule, we simply decorate our ILogger property with an Import attribute that specifies what type we need to import (this is because we could very well be importing a different type of contract than is satisfied directly (see the slide on Lazy for more info)). This is how simple it is. Decorate with an Import attribute and MEF has all the information it needs for this specific part.NOTES:This could also be done on a constructor that accepts an ILogger and uses the ImportingConstructor attribute.
  8. MESSAGING:In the case of our DiscountRule, we simply decorate our ILogger property with an Import attribute that specifies what type we need to import (this is because we could very well be importing a different type of contract than is satisfied directly (see the slide on Lazy for more info)). This is how simple it is. Decorate with an Import attribute and MEF has all the information it needs for this specific part.NOTES:This could also be done on a constructor that accepts an ILogger and uses the ImportingConstructor attribute.
  9. MESSAGING:Now this is good for a single import, but what about when I need to import many of a specific export? For example our RulesEngine imports a collection of rules. In this case we use an ImportManyAttribute on a collection.Note if we do ImportMany on a constuctor we must specify the [ImportMany] attribute explicitly.
  10. MESSAGING:In the desktop there’s a bunch of work you need to do to get the composition going including creating a container and the catalogs. There’s also challenges particularly in XAML scenarios where the XAML runtime creates things like UserControls which don’t’ have access to the container. In Silverlight, we wanted to make it as simple as possible to get-going using MEF in your applications. There’s no need to create container or a catalog. We will automatically create a container for you and add to all the assemblies in the current XAP. All you need to do is call SatisfyImports on PartInitializer and we’ll take care of the rest.
  11. MESSAGING:Now in the case of Exports, exports are contracts a part offers to other parts. In the case of our DiscountRule, we are exporting ourself as an IRule. This is done very easily by decorating our class with an Export class and specifying that we would like to export ourselves specifically as an IRule (it’s important to note, that if you left out “typeof(IRule)”, the class would be exported as a DiscountRule instead (so other parts importing IRule would not find us)).Once again, very simple. Decorate with an Export attribute and MEF has all the information it needs for this specific part.
  12. MESSAGING:Now this is good for a single import, but what about when I need to import many of a specific export? For example our RulesEngine imports a collection of rules. In this case we use an ImportManyAttribute on a collection.Note if we do ImportMany on a constuctor we must specify the [ImportMany] attribute explicitly.
  13. MESSAGING:Now in the case of Exports, exports are contracts a part offers to other parts. In the case of our DiscountRule, we are exporting ourself as an IRule. This is done very easily by decorating our class with an Export class and specifying that we would like to export ourselves specifically as an IRule (it’s important to note, that if you left out “typeof(IRule)”, the class would be exported as a DiscountRule instead (so other parts importing IRule would not find us)).Once again, very simple. Decorate with an Export attribute and MEF has all the information it needs for this specific part.
  14. MESSAGING:Now in the case of Exports, exports are contracts a part offers to other parts. In the case of our DiscountRule, we are exporting ourself as an IRule. This is done very easily by decorating our class with an Export class and specifying that we would like to export ourselves specifically as an IRule (it’s important to note, that if you left out “typeof(IRule)”, the class would be exported as a DiscountRule instead (so other parts importing IRule would not find us)).Once again, very simple. Decorate with an Export attribute and MEF has all the information it needs for this specific part.