SlideShare a Scribd company logo
1 of 36
HOW TO BUILD
COMPOSITE
APPLICATIONS WITH
PRISM
EMIL STOYCHEV, SILVERLIGHT MVP
Bio
•   CTO, CompletIT
•   Co-founder, SilverlightShow
•   Silverlight MVP
•   Silverlight Bulgaria UG Lead
•   Blog – http://emil.silverlightshow.net
•   Twitter - @estoychev – do you follow me?




                                               2
Content
• What are Composite Applications?
• Design and Technical Concepts in Prism
• Quick Starts
What are Composite Applications?


    Feature multiple    Rich, flexible user   Role-determined
        screens            interaction            behavior



    Built to last and   Start small, evolve   Quickly response
    built for change        over time           to changes


                           Use loosely
                            coupled,
                         independently
                        evolvable pieces
What are Composite Applications?




                                                                               Composite Applications
                           tightly-coupled with no   loosely-coupled
                           clear separation of       modules
 Monolithic Applications




                           concerns
                           hard to extend            common shell
                           hard to maintain          common services
                           hard to test              separated
                           hard to deploy            presentation patterns
                           easy to introduce new     mockability/testability
                           bugs when fixing others
What is Prism?
• Set of guidance (not a framework)
• Design and build flexible client applications
• Will help you if:

                                                                               You must be able to
    You are developing,                Your application will add
                                                                             change the application
   testing, and deploying               more views and more
                                                                            quickly and safely to meet
  modules independently of              functionality over the
                                                                               emergent business
     the other modules.                     coming years.
                                                                                  requirements.




                                                           Your application targets
                    Your application is being
                                                          both WPF and Silverlight,
                     developed by multiple
                                                          and you want to share as
                      collaborating teams.
                                                           much code as possible.
Prism Assets
• Found at http://prism.codeplex.com
• Composite Application Library (CAL) source
  code
• Stock Trader Reference Implementation
• Quick Starts
• Documentation
Design Concepts: UI Composition
UI Composition: View Composition
• Display views from different modules on
  named locations within your app’s UI
• View creation
  – Programmatically – View Injection
  – Automatically – View Discovery
View Composition: View Injection
• Views are programmatically added/ removed
  from a named location by the modules
View Composition: View Discovery
• Modules register views for a named location
UI Composition: Commanding
• Decouple the view from the presentation logic
• Move handling logic away from the code
  behind
UI Composition: Eventing
• Enable communication between components
• Event Aggregator – holds event objects
Design Concepts: Modularity
• Modularity is designing a system that is
  divided into a set of functional units (named
  modules) that can be composed into a larger
  application
Design Concepts: Container
• Tie modules together using a dependency
  injection container
• Reduce dependency coupling
• Instantiate instances
• Manages lifetime – singleton, instance
• Usage – register type/instance/service; resolve

  container.RegisterType<ILogger, DBLogger>();
  ILogger logger = container.Resolve<ILogger>();
Design Concepts: Multi-targeting
• Write once, use on both WPF and Silverlight
• Silverlight and WPF – not binary compatible
• The goal is reuse of source code
  – ViewModels, Models, Controllers, Services, Unit
    Tests
• Harder to reuse
  – Complex views (xaml), controls, styling,
    animations
Technical Concepts
Bootstrapper
• Responsible for application initialization
• CAL includes UnityBootstrapper from Unity
Configure the Container
• Register core services
  – IModuleInitializer
  – IModuleManager
  – IRegionManager
  – IEventAggregator
  –…
Configuring the RegionAdapter
              Mappings
• Used by region manager to associate the
  correct adapters for XAML-defined regions
• Default mappings
  – TabControl (Silverlight-only)
  – Selector
  – ItemsControl
  – ContentControl
Creating the Shell
• Allows greater testability
• Shell gets displayed
Initializing the Modules
• ModuleManager service is resolved
• Creates and loads the ModuleCatalog
• Initializes any available modules
Meet the

BOOTSTRAPPER
Module
• Module is packaged in an assembly
• Must contain an IModule class
Discover Modules
• Defining modules in code
• Defining modules in XAML
• Reading module information from a
  configuration file
• Loading all modules in a directory (only in
  WPF)
Load Modules
• Retrieve module from web (or get from disk)
• Transfer into memory
Initialize Modules
• Call the module IModule class Initialize
  method
• Register types with the container
• Register views for a region
• Integrate with application
  – Subscribe to events
  – Add view to app navigation
Module Options
• ModuleA can depend on ModuleB
• Loading
  – WhenAvailable – referenced by the shell
  – OnDemand – download from Web when needed
Discover

MODULES
Shell
•   Application’s main window
•   Contains multiple views
•   May contain regions
•   May define top UI elements – toolbar, menu
Shell
Regions
•   Named locations in a Shell
•   Think of a Placeholder
•   May contain a single or multiple views
•   RegionManager
    – Holds regions
    – Creates regions
• RegionContext – Share context between
  parent and child view
View
• Collection of UI elements contained in a Shell
• Main unit of UI construction
• Maight be a UserControl, DataTemplate or a
  Custom Control
• Composite Views – contain a view in itself –
  most commonly by defining a region
Meet

SHELL, REGIONS, VIEWS
Questions?




             35
Thank you!




             36

More Related Content

What's hot

IBM Workload Deployer Terminology 101
IBM Workload Deployer Terminology 101IBM Workload Deployer Terminology 101
IBM Workload Deployer Terminology 101Dustin Amrhein
 
Mobile Patterns with WebSphere Message Broker
Mobile Patterns with WebSphere Message BrokerMobile Patterns with WebSphere Message Broker
Mobile Patterns with WebSphere Message BrokerAnt Phillips
 
Subversion Edge Overview
Subversion Edge OverviewSubversion Edge Overview
Subversion Edge OverviewLotharSchubert
 
JEE Course - EJB
JEE Course - EJBJEE Course - EJB
JEE Course - EJBodedns
 
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Anton Arhipov
 
Taking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source SoftwareTaking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source SoftwareDavid Currie
 
01 persistence and domain modeling
01 persistence and domain modeling01 persistence and domain modeling
01 persistence and domain modelingthirumuru2012
 
Advanced Pattern Authoring with WebSphere Message Broker
Advanced Pattern Authoring with WebSphere Message BrokerAdvanced Pattern Authoring with WebSphere Message Broker
Advanced Pattern Authoring with WebSphere Message BrokerAnt Phillips
 

What's hot (12)

Lec 2 30_jul13
Lec 2 30_jul13Lec 2 30_jul13
Lec 2 30_jul13
 
IBM Workload Deployer Terminology 101
IBM Workload Deployer Terminology 101IBM Workload Deployer Terminology 101
IBM Workload Deployer Terminology 101
 
Mobile Patterns with WebSphere Message Broker
Mobile Patterns with WebSphere Message BrokerMobile Patterns with WebSphere Message Broker
Mobile Patterns with WebSphere Message Broker
 
Subversion Edge Overview
Subversion Edge OverviewSubversion Edge Overview
Subversion Edge Overview
 
Spring
SpringSpring
Spring
 
JEE Course - EJB
JEE Course - EJBJEE Course - EJB
JEE Course - EJB
 
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
 
Portlet factory 101
Portlet factory 101Portlet factory 101
Portlet factory 101
 
Taking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source SoftwareTaking the Application Server to Web Scale with Netflix Open Source Software
Taking the Application Server to Web Scale with Netflix Open Source Software
 
01 persistence and domain modeling
01 persistence and domain modeling01 persistence and domain modeling
01 persistence and domain modeling
 
Advanced Pattern Authoring with WebSphere Message Broker
Advanced Pattern Authoring with WebSphere Message BrokerAdvanced Pattern Authoring with WebSphere Message Broker
Advanced Pattern Authoring with WebSphere Message Broker
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 

Similar to How to Build Composite Applications with PRISM

Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesQamar Abbas
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkASG
 
SpringCloudConfig.pptx.pdf
SpringCloudConfig.pptx.pdfSpringCloudConfig.pptx.pdf
SpringCloudConfig.pptx.pdfKnoldus Inc.
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to MicroservicesKyle Brown
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar PresantationAbhishek Yadav
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsBrad Williams
 
Introduction to Microsoft Prism
Introduction to Microsoft PrismIntroduction to Microsoft Prism
Introduction to Microsoft PrismTomaš Maconko
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsNish Anil
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Phil Leggetter
 
MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.PLovababu
 
"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...Fwdays
 
Porting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidancePorting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidanceOur Community Exchange LLC
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applicationsJulien Dubois
 
MICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptxMICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptxMohammedShahid562503
 
Real World Windows Phone Development
Real World Windows Phone DevelopmentReal World Windows Phone Development
Real World Windows Phone DevelopmentIgor Kulman
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitectureABDEL RAHMAN KARIM
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
Calling all modularity solutions
Calling all modularity solutionsCalling all modularity solutions
Calling all modularity solutionsSangjin Lee
 

Similar to How to Build Composite Applications with PRISM (20)

Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
SpringCloudConfig.pptx.pdf
SpringCloudConfig.pptx.pdfSpringCloudConfig.pptx.pdf
SpringCloudConfig.pptx.pdf
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to Microservices
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.js
 
Introduction to Microsoft Prism
Introduction to Microsoft PrismIntroduction to Microsoft Prism
Introduction to Microsoft Prism
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with Knockoutjs
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
 
MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.MicroserviceArchitecture in detail over Monolith.
MicroserviceArchitecture in detail over Monolith.
 
"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...
 
Top java script frameworks ppt
Top java script frameworks pptTop java script frameworks ppt
Top java script frameworks ppt
 
Porting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application GuidancePorting the Legacy Application to Composite Application Guidance
Porting the Legacy Application to Composite Application Guidance
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
Cloud native-microservices
Cloud native-microservicesCloud native-microservices
Cloud native-microservices
 
MICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptxMICROSERVICES ARCHITECTURE unit -2.pptx
MICROSERVICES ARCHITECTURE unit -2.pptx
 
Real World Windows Phone Development
Real World Windows Phone DevelopmentReal World Windows Phone Development
Real World Windows Phone Development
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
Calling all modularity solutions
Calling all modularity solutionsCalling all modularity solutions
Calling all modularity solutions
 

More from DataLeader.io

An Introduction to Amazon Aurora Cloud-native Relational Database
An Introduction to Amazon Aurora Cloud-native Relational DatabaseAn Introduction to Amazon Aurora Cloud-native Relational Database
An Introduction to Amazon Aurora Cloud-native Relational DatabaseDataLeader.io
 
Amazon Aurora Cloud-native Relational Database, Section 2.0
Amazon Aurora Cloud-native Relational Database, Section 2.0Amazon Aurora Cloud-native Relational Database, Section 2.0
Amazon Aurora Cloud-native Relational Database, Section 2.0DataLeader.io
 
Amazon Aurora Relational Database Built for the AWS Cloud, Version 1 Series
Amazon Aurora Relational Database Built for the AWS Cloud, Version 1 SeriesAmazon Aurora Relational Database Built for the AWS Cloud, Version 1 Series
Amazon Aurora Relational Database Built for the AWS Cloud, Version 1 SeriesDataLeader.io
 
Kim Schmidt's Resume
Kim Schmidt's ResumeKim Schmidt's Resume
Kim Schmidt's ResumeDataLeader.io
 
Microsoft DigiGirlz, Teaching Teens About Databases (Trick!)
Microsoft DigiGirlz, Teaching Teens About Databases (Trick!)Microsoft DigiGirlz, Teaching Teens About Databases (Trick!)
Microsoft DigiGirlz, Teaching Teens About Databases (Trick!)DataLeader.io
 
The Zen of Silverlight
The Zen of SilverlightThe Zen of Silverlight
The Zen of SilverlightDataLeader.io
 
The Fundamentals of HTML5
The Fundamentals of HTML5The Fundamentals of HTML5
The Fundamentals of HTML5DataLeader.io
 
Microsoft Kinect & the Microsoft MIX11 Game Preview
Microsoft Kinect & the Microsoft MIX11 Game PreviewMicrosoft Kinect & the Microsoft MIX11 Game Preview
Microsoft Kinect & the Microsoft MIX11 Game PreviewDataLeader.io
 
Managing High Availability with Low Cost
Managing High Availability with Low CostManaging High Availability with Low Cost
Managing High Availability with Low CostDataLeader.io
 
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...DataLeader.io
 
Building Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDKBuilding Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDKDataLeader.io
 

More from DataLeader.io (11)

An Introduction to Amazon Aurora Cloud-native Relational Database
An Introduction to Amazon Aurora Cloud-native Relational DatabaseAn Introduction to Amazon Aurora Cloud-native Relational Database
An Introduction to Amazon Aurora Cloud-native Relational Database
 
Amazon Aurora Cloud-native Relational Database, Section 2.0
Amazon Aurora Cloud-native Relational Database, Section 2.0Amazon Aurora Cloud-native Relational Database, Section 2.0
Amazon Aurora Cloud-native Relational Database, Section 2.0
 
Amazon Aurora Relational Database Built for the AWS Cloud, Version 1 Series
Amazon Aurora Relational Database Built for the AWS Cloud, Version 1 SeriesAmazon Aurora Relational Database Built for the AWS Cloud, Version 1 Series
Amazon Aurora Relational Database Built for the AWS Cloud, Version 1 Series
 
Kim Schmidt's Resume
Kim Schmidt's ResumeKim Schmidt's Resume
Kim Schmidt's Resume
 
Microsoft DigiGirlz, Teaching Teens About Databases (Trick!)
Microsoft DigiGirlz, Teaching Teens About Databases (Trick!)Microsoft DigiGirlz, Teaching Teens About Databases (Trick!)
Microsoft DigiGirlz, Teaching Teens About Databases (Trick!)
 
The Zen of Silverlight
The Zen of SilverlightThe Zen of Silverlight
The Zen of Silverlight
 
The Fundamentals of HTML5
The Fundamentals of HTML5The Fundamentals of HTML5
The Fundamentals of HTML5
 
Microsoft Kinect & the Microsoft MIX11 Game Preview
Microsoft Kinect & the Microsoft MIX11 Game PreviewMicrosoft Kinect & the Microsoft MIX11 Game Preview
Microsoft Kinect & the Microsoft MIX11 Game Preview
 
Managing High Availability with Low Cost
Managing High Availability with Low CostManaging High Availability with Low Cost
Managing High Availability with Low Cost
 
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
A Microsoft Silverlight User Group Starter Kit Made Available for Everyone to...
 
Building Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDKBuilding Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDK
 

Recently uploaded

Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 

How to Build Composite Applications with PRISM

  • 1. HOW TO BUILD COMPOSITE APPLICATIONS WITH PRISM EMIL STOYCHEV, SILVERLIGHT MVP
  • 2. Bio • CTO, CompletIT • Co-founder, SilverlightShow • Silverlight MVP • Silverlight Bulgaria UG Lead • Blog – http://emil.silverlightshow.net • Twitter - @estoychev – do you follow me? 2
  • 3. Content • What are Composite Applications? • Design and Technical Concepts in Prism • Quick Starts
  • 4. What are Composite Applications? Feature multiple Rich, flexible user Role-determined screens interaction behavior Built to last and Start small, evolve Quickly response built for change over time to changes Use loosely coupled, independently evolvable pieces
  • 5. What are Composite Applications? Composite Applications tightly-coupled with no loosely-coupled clear separation of modules Monolithic Applications concerns hard to extend common shell hard to maintain common services hard to test separated hard to deploy presentation patterns easy to introduce new mockability/testability bugs when fixing others
  • 6. What is Prism? • Set of guidance (not a framework) • Design and build flexible client applications • Will help you if: You must be able to You are developing, Your application will add change the application testing, and deploying more views and more quickly and safely to meet modules independently of functionality over the emergent business the other modules. coming years. requirements. Your application targets Your application is being both WPF and Silverlight, developed by multiple and you want to share as collaborating teams. much code as possible.
  • 7. Prism Assets • Found at http://prism.codeplex.com • Composite Application Library (CAL) source code • Stock Trader Reference Implementation • Quick Starts • Documentation
  • 8. Design Concepts: UI Composition
  • 9. UI Composition: View Composition • Display views from different modules on named locations within your app’s UI • View creation – Programmatically – View Injection – Automatically – View Discovery
  • 10. View Composition: View Injection • Views are programmatically added/ removed from a named location by the modules
  • 11. View Composition: View Discovery • Modules register views for a named location
  • 12. UI Composition: Commanding • Decouple the view from the presentation logic • Move handling logic away from the code behind
  • 13. UI Composition: Eventing • Enable communication between components • Event Aggregator – holds event objects
  • 14. Design Concepts: Modularity • Modularity is designing a system that is divided into a set of functional units (named modules) that can be composed into a larger application
  • 15. Design Concepts: Container • Tie modules together using a dependency injection container • Reduce dependency coupling • Instantiate instances • Manages lifetime – singleton, instance • Usage – register type/instance/service; resolve container.RegisterType<ILogger, DBLogger>(); ILogger logger = container.Resolve<ILogger>();
  • 16. Design Concepts: Multi-targeting • Write once, use on both WPF and Silverlight • Silverlight and WPF – not binary compatible • The goal is reuse of source code – ViewModels, Models, Controllers, Services, Unit Tests • Harder to reuse – Complex views (xaml), controls, styling, animations
  • 18. Bootstrapper • Responsible for application initialization • CAL includes UnityBootstrapper from Unity
  • 19. Configure the Container • Register core services – IModuleInitializer – IModuleManager – IRegionManager – IEventAggregator –…
  • 20. Configuring the RegionAdapter Mappings • Used by region manager to associate the correct adapters for XAML-defined regions • Default mappings – TabControl (Silverlight-only) – Selector – ItemsControl – ContentControl
  • 21. Creating the Shell • Allows greater testability • Shell gets displayed
  • 22. Initializing the Modules • ModuleManager service is resolved • Creates and loads the ModuleCatalog • Initializes any available modules
  • 24. Module • Module is packaged in an assembly • Must contain an IModule class
  • 25. Discover Modules • Defining modules in code • Defining modules in XAML • Reading module information from a configuration file • Loading all modules in a directory (only in WPF)
  • 26. Load Modules • Retrieve module from web (or get from disk) • Transfer into memory
  • 27. Initialize Modules • Call the module IModule class Initialize method • Register types with the container • Register views for a region • Integrate with application – Subscribe to events – Add view to app navigation
  • 28. Module Options • ModuleA can depend on ModuleB • Loading – WhenAvailable – referenced by the shell – OnDemand – download from Web when needed
  • 30. Shell • Application’s main window • Contains multiple views • May contain regions • May define top UI elements – toolbar, menu
  • 31. Shell
  • 32. Regions • Named locations in a Shell • Think of a Placeholder • May contain a single or multiple views • RegionManager – Holds regions – Creates regions • RegionContext – Share context between parent and child view
  • 33. View • Collection of UI elements contained in a Shell • Main unit of UI construction • Maight be a UserControl, DataTemplate or a Custom Control • Composite Views – contain a view in itself – most commonly by defining a region

Editor's Notes

  1. To compose your user interface, you need an architecture that allows you to create a layout composed of loosely coupled visual elements at run time and that provides strategies for these visual elements to communicate in a loosely coupled fashion.
  2. application contains a registry of named locations in the UI and a module can look up one of the locations using the registry and then programmatically inject views into it.
  3. When that location is displayed at run time, any views that have been registered for that location will be automatically created and displayed within it.
  4. Enable testability
  5. Applications based on the Composite Application Library are composites that potentially consist of many loosely coupled modules. They need to interact with the shell to contribute content and receive notifications based on user actions. Because they are loosely coupled, they need a way to interact and communicate with one another to deliver the required business functionality.
  6. The bootstrapper is responsible for the initialization of an application built using the Composite Application Library. By using a bootstrapper, you have more control of how the Composite Application Library components are wired up to your application.
  7. During this phase, the shell will be displayed if it exists. Having the creation of the shell in the bootstrapper allows greater testability of the application because the shell can be mocked in a unit test.
  8. During this phase, module loading occurs. First, the module manager service is resolved from the container. After that, the Run method of the module manager service is invoked. This method validates the module catalog and initializes the available modules.
  9. The ModuleCatalog holds information about the modules that can be used by the application. Each module is described in a ModuleInfo class that records the name, type, and location, among other attributes of the module.
  10. After the ModuleCatalog is populated, the modules are ready to be loaded and initialized. Module loading means that the module assembly is transferred from disk into memory. If the assembly is not present on disk, it might have to be retrieved first. An example of this is downloading assemblies from the Web using Silverlight XAP files. The ModuleManager is responsible for coordinating the whole loading and initialization process.
  11. Finally, the modules have to be initialized. This means, an instance of the module classes must be created and their Initialize() method must be called