Your SlideShare is downloading. ×
0
Shine a Light with “Prism” Dave Bost Developer Evangelist http://davebost.com/blog Pre-requisites for this presentation:  ...
http://thirstydeveloper.com “ Looking at someone’s code, but with audio”
Session Objectives And Takeaways <ul><li>Session Objective(s):  </li></ul><ul><ul><li>Able to determine RIA composite appl...
Are you building this?
Or something like this?
The Challenge
The Solution
Consider Prism <ul><li>Provides Tools to help with separating your app and composing at run-time: </li></ul><ul><ul><li>To...
Prism-What’s in the box <ul><li>Prism – Composite Client Application Guidance for WPF and Silverlight </li></ul><ul><ul><l...
Reference Implementation
Prism Core Concepts
Modules <ul><li>Unit Of Application Assembly </li></ul><ul><ul><li>Collection of Related Components </li></ul></ul><ul><ul...
Modules <ul><li>Module Discovery </li></ul><ul><ul><li>Pluggable Catalogs </li></ul></ul><ul><li>Module Loading </li></ul>...
Demo Modules & Catalogs
UI Composition <ul><li>Shell – Application Host Window </li></ul><ul><li>Regions – Named Areas For View Placement </li></u...
UI Composition <ul><li>View Discovery Composition: </li></ul><ul><ul><li>Less Complex </li></ul></ul><ul><ul><li>Black Box...
Demo UI Composition
Commands and Events <ul><li>Delegate & Composite Commands </li></ul><ul><ul><li>Simplified Command Handling </li></ul></ul...
Prism Silverlight Logical Architecture HOST APPLICATION LOADING SERVICES CORE SERVICES MODULE PROFFERED SERVICES Modules M...
Multi-Targeting <ul><li>User Experiences </li></ul><ul><ul><li>Desktop – In the Office, Full Functionality, Offline  </li>...
Multi-Targeting: Strategies <ul><li>Start with LCD </li></ul><ul><li>Use Links and Parallel Project Structures </li></ul><...
Multi-Targeting Controllers Models Presenters Views Views WPF CLR - Silverlight CLR Desktop BCL BCL BROWSER DESKTOP Models...
Demo Multi-Targeting
Where Can You Find It? <ul><li>www.microsoft.com/compositewpf </li></ul><ul><li>www.codeplex.com/compositewpf </li></ul><u...
Summary <ul><li>Prism </li></ul><ul><ul><li>Library of Patterns for Composite Client Applications </li></ul></ul><ul><ul><...
Dave Bost thank you! http://davebost.com http://twitter.com/davebost Q&A
 
 
Upcoming SlideShare
Loading in...5
×

Shine a Light with Prism (the Composite Application Guidance for WPF and Silverlight)

2,097

Published on

This is the slide deck of the session I presented at VSLive San Francisco 2009 on Feb. 26, 2009

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,097
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
80
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • MGB 2003 © 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • Transcript of "Shine a Light with Prism (the Composite Application Guidance for WPF and Silverlight)"

    1. 1. Shine a Light with “Prism” Dave Bost Developer Evangelist http://davebost.com/blog Pre-requisites for this presentation: 1) IoC, DI 2) Presentation patterns Level: Intermediate
    2. 2. http://thirstydeveloper.com “ Looking at someone’s code, but with audio”
    3. 3. Session Objectives And Takeaways <ul><li>Session Objective(s): </li></ul><ul><ul><li>Able to determine RIA composite application scenarios and recommend solutions for the scenarios using Prism for Silverlight and WPF. </li></ul></ul><ul><li>Prism – V2 in Feb shipped Feb. ‘09 (Silverlight) </li></ul><ul><li>Provides written and code-example guidance for composite solution space </li></ul><ul><li>Supports targeting both Silverlight & WPF composite applications </li></ul>
    4. 4. Are you building this?
    5. 5. Or something like this?
    6. 6. The Challenge
    7. 7. The Solution
    8. 8. Consider Prism <ul><li>Provides Tools to help with separating your app and composing at run-time: </li></ul><ul><ul><li>Tools to help you discover the pieces </li></ul></ul><ul><ul><li>Strategies and guidance for recomposition </li></ul></ul><ul><ul><li>Approaches for communication between these separate components </li></ul></ul><ul><ul><li>Event help with targeting both Silverlight and WPF </li></ul></ul>
    9. 9. Prism-What’s in the box <ul><li>Prism – Composite Client Application Guidance for WPF and Silverlight </li></ul><ul><ul><li>Library </li></ul></ul><ul><ul><li>Reference Implementation </li></ul></ul><ul><ul><li>Documentation </li></ul></ul><ul><ul><li>Quick-Starts & How-To’s </li></ul></ul><ul><ul><li>Community – CodePlex </li></ul></ul><ul><li>Prism 1.0 – WPF </li></ul><ul><ul><li>Released July 2008 </li></ul></ul><ul><li>Prism 2.0 – Silverlight </li></ul><ul><ul><li>Released February 2009 </li></ul></ul>
    10. 10. Reference Implementation
    11. 11. Prism Core Concepts
    12. 12. Modules <ul><li>Unit Of Application Assembly </li></ul><ul><ul><li>Collection of Related Components </li></ul></ul><ul><ul><li>Feature, Services, Views, Data Access </li></ul></ul><ul><ul><li>Mandatory or Optional or Role Specific </li></ul></ul><ul><ul><li>Example: Banking app: Checking Module, Credit Card Module, Trading Module, News Module </li></ul></ul><ul><li>Unit Of Development </li></ul><ul><ul><li>Independent Development </li></ul></ul><ul><ul><li>Independent Testing </li></ul></ul><ul><li>Unit Of Deployment </li></ul><ul><ul><li>Up-Front, Background or On-Demand </li></ul></ul>
    13. 13. Modules <ul><li>Module Discovery </li></ul><ul><ul><li>Pluggable Catalogs </li></ul></ul><ul><li>Module Loading </li></ul><ul><ul><li>Background or On-Demand </li></ul></ul>Module Loader Extended In Prism 2.0!
    14. 14. Demo Modules & Catalogs
    15. 15. UI Composition <ul><li>Shell – Application Host Window </li></ul><ul><li>Regions – Named Areas For View Placement </li></ul><ul><li>Views – Encapsulate UI & Presentation Logic </li></ul>Region Region Region // View Injection IPositionPresentationModel presentationModel = …; IRegion mainRegion = regionManager.Regions[ &quot;MainRegion&quot; ]; mainRegion.Add( presentationModel.View ); < TabControl RegionManager.RegionName = &quot;MainRegion&quot;> < ItemsControl RegionManager.RegionName = “ResearchRegion” /> < ContentControl RegionManager.RegionName = “ActionRegion” />
    16. 16. UI Composition <ul><li>View Discovery Composition: </li></ul><ul><ul><li>Less Complex </li></ul></ul><ul><ul><li>Black Box ‘App Assembly’ Composition </li></ul></ul><ul><ul><li>Select Views & Pull into Region </li></ul></ul>Region Region Region New In Prism 2.0! < TabControl RegionManager.RegionName = &quot;MainRegion&quot;> regionManager. RegisterViewWithRegion( &quot;MainRegion&quot;, typeof ( MainView ) );
    17. 17. Demo UI Composition
    18. 18. Commands and Events <ul><li>Delegate & Composite Commands </li></ul><ul><ul><li>Simplified Command Handling </li></ul></ul><ul><li>Event Aggregator </li></ul><ul><ul><li>Loosely Coupled Pub/Sub Events </li></ul></ul>Event Aggregator Module B Customer Presenter Module A Order Presenter Subscribe Publish Event
    19. 19. Prism Silverlight Logical Architecture HOST APPLICATION LOADING SERVICES CORE SERVICES MODULE PROFFERED SERVICES Modules MODULES Presenter Model View Model ModuleCatalog Module Loader EventAggregator Logging RegionManager Unity Module Initializer
    20. 20. Multi-Targeting <ul><li>User Experiences </li></ul><ul><ul><li>Desktop – In the Office, Full Functionality, Offline </li></ul></ul><ul><ul><li>RIA – Out of the Office, Functional Subset, Online </li></ul></ul>WPF Application Silverlight (RIA) Application CLR - Silverlight CLR Desktop BCL BCL BROWSER DESKTOP
    21. 21. Multi-Targeting: Strategies <ul><li>Start with LCD </li></ul><ul><li>Use Links and Parallel Project Structures </li></ul><ul><li>Separated Presentation Strategies </li></ul><ul><li>Keep single source </li></ul><ul><li>If not, apply the sieve </li></ul>#IF SILVERLIGHT Partial Classes Partial Methods Separate Classes Rewrite the Code
    22. 22. Multi-Targeting Controllers Models Presenters Views Views WPF CLR - Silverlight CLR Desktop BCL BCL BROWSER DESKTOP Models Controllers Presenters
    23. 23. Demo Multi-Targeting
    24. 24. Where Can You Find It? <ul><li>www.microsoft.com/compositewpf </li></ul><ul><li>www.codeplex.com/compositewpf </li></ul><ul><li>http://msdn.microsoft.com/practices </li></ul><ul><li>http://blogs.msdn.com/bobbrum </li></ul><ul><li>http://blogs.msdn.com/blaine </li></ul>
    25. 25. Summary <ul><li>Prism </li></ul><ul><ul><li>Library of Patterns for Composite Client Applications </li></ul></ul><ul><ul><li>Targets WPF Desktop and Silverlight RIA Applications </li></ul></ul><ul><ul><li>View Disovery Composition, Separated Presentation Patterns, Module Catalog </li></ul></ul><ul><ul><li>Multi-Targeting to reuse code between Silverlight and WPF </li></ul></ul><ul><li>Download from CodePlex and send us feedback </li></ul>
    26. 26. Dave Bost thank you! http://davebost.com http://twitter.com/davebost Q&A
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×