Upload
christian-thilmany
View
721
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Creating UX Applications that Target both Silverlight and WPF
Citation preview
Christian ThilmanyBlog: www.flyover18.comUX ArchitectMicrosoft Corporation
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
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!
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
ModulesModule Discovery
Pluggable CatalogsModule Loading
Background or On-Demand
Module Module LoaderLoader
Extended InExtended InPrism 2.0!Prism 2.0!
Modules & Catalogs
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” />
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 ) );
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
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
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
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
WP
FW
PF
CLR - SilverlightCLR - Silverlight CLR DesktopCLR Desktop
BCLBCL BCLBCL
BROWSER
DESKTOP
Multi-Targeting
Controllers
Models
Presenters
Views
Models
Controllers
Presenters
Views
Stock Trader RI
Where Can You Find It?www.microsoft.com/compositewpfwww.codeplex.com/compositewpfhttp://www.flyover18.com
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
© 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.