Creating UX Applications that Target both Silverlight and WPF
-
Upload
christian-thilmany -
Category
Technology
-
view
717 -
download
0
description
Transcript of Creating UX Applications that Target both Silverlight and WPF
![Page 1: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/1.jpg)
Christian ThilmanyBlog: www.flyover18.comUX ArchitectMicrosoft Corporation
![Page 2: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/2.jpg)
Session Objectives And Takeaways• Session Objective(s):
• Able to determine RIA composite application scenarios and recommend solutions for the scenarios using Prism for Silverlight and WPF.
• Prism – V2 out now• Provides written and code-example guidance for
composite solution space• Supports targeting both Silverlight & WPF
composite applications
![Page 3: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/3.jpg)
![Page 4: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/4.jpg)
![Page 5: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/5.jpg)
![Page 6: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/6.jpg)
![Page 7: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/7.jpg)
![Page 8: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/8.jpg)
Prism-What’s in the boxPrism – Composite Client Application
Guidance for WPF and SilverlightLibraryReference ImplementationDocumentationQuick-Starts & How-To’sCommunity – CodePlex
Prism 1.0 – WPFReleased July 2008
Prism 2.0 – SilverlightJust Released Feb 2009!
![Page 9: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/9.jpg)
![Page 10: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/10.jpg)
![Page 11: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/11.jpg)
ModulesUnit Of Application Assembly
Collection of Related ComponentsFeature, Services, Views, Data AccessMandatory or Optional or Role SpecificExample: Banking app: Checking Module,
Credit Card Module, Trading Module, News Module
Unit Of DevelopmentIndependent Development/Testing
Unit Of DeploymentUp-Front, Background or On-Demand
![Page 12: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/12.jpg)
ModulesModule Discovery
Pluggable CatalogsModule Loading
Background or On-Demand
Module Module LoaderLoader
Extended InExtended InPrism 2.0!Prism 2.0!
![Page 13: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/13.jpg)
Modules & Catalogs
![Page 14: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/14.jpg)
UI CompositionShell – Application Host WindowRegions – Named Areas For View PlacementViews – Encapsulate UI & Presentation Logic
RegionRegion
Region
Region
RegionRegion
// View InjectionIPositionPresentationModel presentationModel = …;
IRegion mainRegion = regionManager.Regions[ "MainRegion" ];
mainRegion.Add( presentationModel.View );<TabControl RegionManager.RegionName= "MainRegion">
<ItemsControl RegionManager.RegionName= “ResearchRegion” />
<ContentControlRegionManager.RegionName= “ActionRegion” />
![Page 15: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/15.jpg)
UI CompositionView Discovery Composition:
Less ComplexBlack Box ‘App Assembly’ CompositionSelect Views & Pull into Region
New InNew InPrism 2.0!
Prism 2.0!
RegionRegion
Region
Region
RegionRegion
<TabControl RegionManager.RegionName= "MainRegion">
regionManager. RegisterViewWithRegion( "MainRegion", typeof( MainView ) );
![Page 16: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/16.jpg)
Commands and EventsDelegate & Composite Commands
Simplified Command HandlingEvent Aggregator
Loosely Coupled Pub/Sub Events
Module BCustomerPresenter
Module AOrder
Presenter
EventAggregator
Subscrib
e
Pub
lish
Event
![Page 17: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/17.jpg)
Prism Silverlight Logical ArchitectureHOST APPLICATIONHOST APPLICATION LOADING
SERVICESLOADING SERVICES
CORE SERVICES
CORE SERVICES
MODULE PREFFERED SERVICES
MODULE PREFFERED SERVICES
ModulesModulesMODULESMODULES
PresenterPresenter
Model
ViewView
ModelModel
ModuleCatalog
Module Loader
EventAggregator
Logging
RegionManager
Un
ity
Module Initializer
![Page 18: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/18.jpg)
Multi-TargetingUser Experiences
Desktop – In the Office, Full Functionality, Offline RIA – Out of the Office, Functional Subset, Online
WPFApplication
WPFApplication
Silverlight (RIA)Application
Silverlight (RIA)Application
CLR - SilverlightCLR - Silverlight CLR DesktopCLR Desktop
BCLBCL BCLBCL
BROWSER
DESKTOP
![Page 19: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/19.jpg)
Multi-Targeting: StrategiesStart with LCDUse Links and Parallel Project StructuresSeparated Presentation StrategiesKeep single source If not, apply the sieve
#IF SILVERLIGHT#IF SILVERLIGHT
Partial ClassesPartial Classes
Partial MethodsPartial Methods
Separate ClassesSeparate Classes
Rewrite the CodeRewrite the Code
![Page 20: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/20.jpg)
WP
FW
PF
CLR - SilverlightCLR - Silverlight CLR DesktopCLR Desktop
BCLBCL BCLBCL
BROWSER
DESKTOP
Multi-Targeting
Controllers
Models
Presenters
Views
Models
Controllers
Presenters
Views
![Page 21: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/21.jpg)
Stock Trader RI
![Page 22: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/22.jpg)
Where Can You Find It?www.microsoft.com/compositewpfwww.codeplex.com/compositewpfhttp://www.flyover18.com
![Page 23: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/23.jpg)
Summary
PrismLibrary of Patterns for Composite Client
ApplicationsTargets WPF Desktop and Silverlight RIA
ApplicationsView Discovery Composition, Separated
Presentation Patterns, Module CatalogMulti-Targeting to reuse code between Silverlight
and WPFDownload from CodePlex and send us feedback
![Page 24: Creating UX Applications that Target both Silverlight and WPF](https://reader035.fdocuments.us/reader035/viewer/2022062615/548b815ab479590f5b8b4575/html5/thumbnails/24.jpg)
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions,
it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.