SlideShare a Scribd company logo
Introduction to
Microsoft Prism
Tomaš Maconko
Issue
• We need a HUGE WPF desktop application
• Application must be module-based (plugin-based)
• Modules are developed by different teams in different countries
• Team work is not synchronized
• Application must be tested periodically
Solution
• Easy, but totally not acceptable – decline the project
• Hard, but hardly acceptable – write your own module
management infrastructure
• Medium and acceptable – use an already implemented
framework for modular applications
Microsoft Prism
• Used in applications consisting of multiple modules
• Contains module management infrastructure
• Provides navigation between views, even if navigation is
performed between views from different modules
• Allows application to evolve and enables easy-maintenance
• Currently used in WinRT, WPF, Silverlight and Windows Phone
apps
Reusability
• Allows components and services to be developed, tested and
integrated into one or more applications
• Reuse of unit-tested components that can be easily discovered
and integrated at run time through dependency injection
• Modules can encapsulate application-level capabilities that may
be reused across applications
Extensibility
• Allows components to be more easily integrated or replaced
with alternative implementations at run time
• Provides the ability to decompose an application into modules
that can be independently updated and deployed
• Many of the components in the Prism Library itself can also be
extended or replaced
Flexibility
• Allows to extend the application with new capabilities, that can
be easily developed and integrated
• Allows WPF applications to be developed using common
services and components, allowing the application to be
deployed and consumed in the most appropriate way
Team Development
• Allows separate teams to develop and even deploy different
parts of the application independently
• Minimizes the cross-team dependencies and allows teams to
focus on:
• Different functional areas: UI design, business logic implementation,
and infrastructure code development
• Different business-level functional areas: profile, sales, inventory, or
logistics
Quality
• Allows common services and components to be fully tested and
made available to the development teams
• Allows development teams to focus on their application
requirements instead of implementing and testing infrastructure
code
Where to use it?
Module management infrastructure
• Load modules immediately or on demand depending on
configuration
• There can be no direct/static references between projects
• Modules can be configured through C# code or in configuration
file
• Can register each module separately or read all modules from
directory
Configuration is simple
Module initialization sequence
1. When application starts
BaDemo.Common is initialized as it is
static reference.
2. Next BaDemo.Main is loaded, because
is should be initialized immediately
after startup.
3. A. If the user requested
BaDemo.Orders, then both
BaDemo.Orders and BaDemo.Items
would be initialized, as BaDemo.Orders
depends on BaDemo.Items.
4. If the user requested BaDemo.Items,
then it is initialized without
BaDemo.Orders.
BaDemo
BaDemo.Main
BaDemo.Items
BaDemo.Common
BaDemo.Orders
1. On application start
2. On application start 3a. On requested
4. On requested
3b. On BaDemo.Orders
module requested
Other features
• Model-View-ViewModel
pattern utilities
• Navigation handling
• Dependency Injection support
• Event aggregation
Model-View-ViewModel
• INotifyPropertyChanged
implementation
• ICommand implementation
Navigation handling
• IRegionManager • INavigationAware
Dependency injection support
• Registration • Usage
• Registration can be done in
Bootstrapper class or in each
module
• Each container provides its own
dependency management
mechanism:
• MEF uses attributes to specify the
exported and imported dependencies
• Unity container requires registration
of types and can automatically resolve
instances
• And so on...
Event aggregation
Conclusions
• Prism seems to be usable and proper framework for in modular
application development
• It contains many tools for easy module management, navigation
between modules
• It provides additional tools for MVVM, DI, Event Aggregation
and other patterns
• It’s Open Source
Sources
• Prism CodePlex: http://compositewpf.codeplex.com/SourceControl/latest
• MSDN Prism Guide: https://msdn.microsoft.com/en-us/library/ff648465.aspx
• Demo in GitHub: https://github.com/tmaconko/BaDemo
Keep #EnjoyIT
Contact me, if you have questions:
• t.maconko@ba.lt
• www.ba.lt

More Related Content

What's hot

Mule esb domain
Mule esb domainMule esb domain
Mule esb domain
D.Rajesh Kumar
 
Spring framework
Spring frameworkSpring framework
VMware View Failover - SOLVED
VMware View Failover - SOLVEDVMware View Failover - SOLVED
VMware View Failover - SOLVED
Alar Kuuda
 
PowerShell basics day 15
PowerShell basics day 15PowerShell basics day 15
PowerShell basics day 15
Ashish Raj
 
Easy database migrations with C# and FluentMigrator
Easy database migrations with C# and FluentMigratorEasy database migrations with C# and FluentMigrator
Easy database migrations with C# and FluentMigrator
Safal Mahat
 
Mulesoft KL Meetup 2
Mulesoft KL Meetup 2Mulesoft KL Meetup 2
Mulesoft KL Meetup 2
NitushreeJena
 
Creating a custom connector in mule
Creating a custom connector in muleCreating a custom connector in mule
Creating a custom connector in mule
Achyuta Lakshmi
 
Procter & Gamble Modelon INCOSE 2017
Procter & Gamble Modelon INCOSE 2017Procter & Gamble Modelon INCOSE 2017
Procter & Gamble Modelon INCOSE 2017
Modelon
 
Aligning to AEMs Release Cycle
Aligning to AEMs Release CycleAligning to AEMs Release Cycle
Aligning to AEMs Release Cycle
Ashokkumar T A
 

What's hot (9)

Mule esb domain
Mule esb domainMule esb domain
Mule esb domain
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
VMware View Failover - SOLVED
VMware View Failover - SOLVEDVMware View Failover - SOLVED
VMware View Failover - SOLVED
 
PowerShell basics day 15
PowerShell basics day 15PowerShell basics day 15
PowerShell basics day 15
 
Easy database migrations with C# and FluentMigrator
Easy database migrations with C# and FluentMigratorEasy database migrations with C# and FluentMigrator
Easy database migrations with C# and FluentMigrator
 
Mulesoft KL Meetup 2
Mulesoft KL Meetup 2Mulesoft KL Meetup 2
Mulesoft KL Meetup 2
 
Creating a custom connector in mule
Creating a custom connector in muleCreating a custom connector in mule
Creating a custom connector in mule
 
Procter & Gamble Modelon INCOSE 2017
Procter & Gamble Modelon INCOSE 2017Procter & Gamble Modelon INCOSE 2017
Procter & Gamble Modelon INCOSE 2017
 
Aligning to AEMs Release Cycle
Aligning to AEMs Release CycleAligning to AEMs Release Cycle
Aligning to AEMs Release Cycle
 

Similar to Introduction to Microsoft Prism

How to Build Composite Applications with PRISM
How to Build Composite Applications with PRISMHow to Build Composite Applications with PRISM
How to Build Composite Applications with PRISM
DataLeader.io
 
VMworld 2013: Best Practices for Application Lifecycle Management with vCloud...
VMworld 2013: Best Practices for Application Lifecycle Management with vCloud...VMworld 2013: Best Practices for Application Lifecycle Management with vCloud...
VMworld 2013: Best Practices for Application Lifecycle Management with vCloud...
VMworld
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.js
Brad Williams
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
Giovanni Scerra ☃
 
Setup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architectureSetup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architecture
Mindfire Solutions
 
Component based development | what, why and how
Component based development | what, why and howComponent based development | what, why and how
Component based development | what, why and how
Rakesh Kumar Jha
 
CISSP - Software Development Security
CISSP - Software Development SecurityCISSP - Software Development Security
CISSP - Software Development Security
Karthikeyan Dhayalan
 
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
Our Community Exchange LLC
 
Software engineering 4 critical analysis of waterfall model
Software engineering 4 critical analysis of waterfall modelSoftware engineering 4 critical analysis of waterfall model
Software engineering 4 critical analysis of waterfall model
Vaibhav Khanna
 
Preparing for DevOps
Preparing for DevOpsPreparing for DevOps
Preparing for DevOps
Eklove Mohan
 
DISE - Introduction to Software Engineering
DISE - Introduction to Software EngineeringDISE - Introduction to Software Engineering
DISE - Introduction to Software Engineering
Rasan Samarasinghe
 
Module 3.1.pptx
Module 3.1.pptxModule 3.1.pptx
Module 3.1.pptx
8840VinayShelke
 
Testing throughout the software life cycle
Testing throughout the software life cycleTesting throughout the software life cycle
Testing throughout the software life cycle
MusTufa Nullwala
 
Incremental model
Incremental model Incremental model
Incremental model
Radadiya Nayan
 
what-is-devops.ppt
what-is-devops.pptwhat-is-devops.ppt
what-is-devops.ppt
MohammadSamiuddin10
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi
 
Modular enablement
Modular enablementModular enablement
Modular enablement
Ori Pomerantz
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to Microservices
Kyle Brown
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
Qamar Abbas
 
Coding
CodingCoding

Similar to Introduction to Microsoft Prism (20)

How to Build Composite Applications with PRISM
How to Build Composite Applications with PRISMHow to Build Composite Applications with PRISM
How to Build Composite Applications with PRISM
 
VMworld 2013: Best Practices for Application Lifecycle Management with vCloud...
VMworld 2013: Best Practices for Application Lifecycle Management with vCloud...VMworld 2013: Best Practices for Application Lifecycle Management with vCloud...
VMworld 2013: Best Practices for Application Lifecycle Management with vCloud...
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.js
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
Setup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architectureSetup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architecture
 
Component based development | what, why and how
Component based development | what, why and howComponent based development | what, why and how
Component based development | what, why and how
 
CISSP - Software Development Security
CISSP - Software Development SecurityCISSP - Software Development Security
CISSP - Software Development Security
 
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
 
Software engineering 4 critical analysis of waterfall model
Software engineering 4 critical analysis of waterfall modelSoftware engineering 4 critical analysis of waterfall model
Software engineering 4 critical analysis of waterfall model
 
Preparing for DevOps
Preparing for DevOpsPreparing for DevOps
Preparing for DevOps
 
DISE - Introduction to Software Engineering
DISE - Introduction to Software EngineeringDISE - Introduction to Software Engineering
DISE - Introduction to Software Engineering
 
Module 3.1.pptx
Module 3.1.pptxModule 3.1.pptx
Module 3.1.pptx
 
Testing throughout the software life cycle
Testing throughout the software life cycleTesting throughout the software life cycle
Testing throughout the software life cycle
 
Incremental model
Incremental model Incremental model
Incremental model
 
what-is-devops.ppt
what-is-devops.pptwhat-is-devops.ppt
what-is-devops.ppt
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
 
Modular enablement
Modular enablementModular enablement
Modular enablement
 
Transforming to Microservices
Transforming to MicroservicesTransforming to Microservices
Transforming to Microservices
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
Coding
CodingCoding
Coding
 

Introduction to Microsoft Prism

  • 2. Issue • We need a HUGE WPF desktop application • Application must be module-based (plugin-based) • Modules are developed by different teams in different countries • Team work is not synchronized • Application must be tested periodically
  • 3. Solution • Easy, but totally not acceptable – decline the project • Hard, but hardly acceptable – write your own module management infrastructure • Medium and acceptable – use an already implemented framework for modular applications
  • 4. Microsoft Prism • Used in applications consisting of multiple modules • Contains module management infrastructure • Provides navigation between views, even if navigation is performed between views from different modules • Allows application to evolve and enables easy-maintenance • Currently used in WinRT, WPF, Silverlight and Windows Phone apps
  • 5. Reusability • Allows components and services to be developed, tested and integrated into one or more applications • Reuse of unit-tested components that can be easily discovered and integrated at run time through dependency injection • Modules can encapsulate application-level capabilities that may be reused across applications
  • 6. Extensibility • Allows components to be more easily integrated or replaced with alternative implementations at run time • Provides the ability to decompose an application into modules that can be independently updated and deployed • Many of the components in the Prism Library itself can also be extended or replaced
  • 7. Flexibility • Allows to extend the application with new capabilities, that can be easily developed and integrated • Allows WPF applications to be developed using common services and components, allowing the application to be deployed and consumed in the most appropriate way
  • 8. Team Development • Allows separate teams to develop and even deploy different parts of the application independently • Minimizes the cross-team dependencies and allows teams to focus on: • Different functional areas: UI design, business logic implementation, and infrastructure code development • Different business-level functional areas: profile, sales, inventory, or logistics
  • 9. Quality • Allows common services and components to be fully tested and made available to the development teams • Allows development teams to focus on their application requirements instead of implementing and testing infrastructure code
  • 11. Module management infrastructure • Load modules immediately or on demand depending on configuration • There can be no direct/static references between projects • Modules can be configured through C# code or in configuration file • Can register each module separately or read all modules from directory
  • 13. Module initialization sequence 1. When application starts BaDemo.Common is initialized as it is static reference. 2. Next BaDemo.Main is loaded, because is should be initialized immediately after startup. 3. A. If the user requested BaDemo.Orders, then both BaDemo.Orders and BaDemo.Items would be initialized, as BaDemo.Orders depends on BaDemo.Items. 4. If the user requested BaDemo.Items, then it is initialized without BaDemo.Orders. BaDemo BaDemo.Main BaDemo.Items BaDemo.Common BaDemo.Orders 1. On application start 2. On application start 3a. On requested 4. On requested 3b. On BaDemo.Orders module requested
  • 14. Other features • Model-View-ViewModel pattern utilities • Navigation handling • Dependency Injection support • Event aggregation
  • 17. Dependency injection support • Registration • Usage • Registration can be done in Bootstrapper class or in each module • Each container provides its own dependency management mechanism: • MEF uses attributes to specify the exported and imported dependencies • Unity container requires registration of types and can automatically resolve instances • And so on...
  • 19. Conclusions • Prism seems to be usable and proper framework for in modular application development • It contains many tools for easy module management, navigation between modules • It provides additional tools for MVVM, DI, Event Aggregation and other patterns • It’s Open Source
  • 20. Sources • Prism CodePlex: http://compositewpf.codeplex.com/SourceControl/latest • MSDN Prism Guide: https://msdn.microsoft.com/en-us/library/ff648465.aspx • Demo in GitHub: https://github.com/tmaconko/BaDemo
  • 21. Keep #EnjoyIT Contact me, if you have questions: • t.maconko@ba.lt • www.ba.lt