Architecting WPF ApplicationsPaul StovellSenior ConsultantWPF Technical SpecialistReadify
Architecting WPF Applications
AgendaWPF OverviewInductive vs. Deductive UINavigationPresentation PatternsCompositionInter-view CommunicationDependency InjectionPartitioningLeveraging XAMLPerformance Considerations
WPF Overview
Unified Presentation
Web or Windows?WindowsIntranet                 InternetSilverlightWindows FormsJavaJava AppletsASP.NETWPF XBAPWPFAJAX
XBAP
XBAP
WPF Releases.NET Framework 3.0.NET Framework 3.5.NET Framework 3.5 Service Pack 1.NET Framework 4.0
Inductive vs. Deductive
Deductive UI
Deductive UI
Inductive UI
Inductive UI
Inductive vs. DeductiveWhy does it matter?UI composition PatternsNavigation PatternsService LayerChangeAddress vs. SaveCustomer
DataGrid
Navigation
Linked ListPage 1Page 2Page 4Page 3
Centralized DecisionsNavigation HandlerPage 1Page 2Page 3Page 4
Presentation Patterns
Presentation PatternsModel-View-ViewModelaka Presentation ModelModel-View-Presenteraka Supervising ControllerModel-View-Controller
Model View ViewModelChange Address ViewModelCustomerAddressAccountsChange Address ViewModel
Model View ViewModel (Wrapped)View ModelChange Address ViewCustomer VMAccount VMAddress VMChange Address ViewModelModelCustomerAccountAddress
Model View PresenterChange Address ViewModelCustomerIChangeAddressViewAddressAccountsChange Address Presenter
Model View Presenter with VMChange Address ViewModelCustomerChange Address ViewModelIChangeAddressViewAddressAccountsChange Address PresenterStateBehaviour
Model View ControllerControllerView 1Model 1View 2Nav RequestModel 2View 3Model 3
Presentation PatternsThings to consider:Does every view need separated presentation?Does every view need to follow the same pattern?Code Behind isn’t Evil (DataGrids are)MVPoo
UI Composition
Model-based CompositionRecent Orders ViewModelSearch ViewModelWeather ViewModelOrder ListSearchWeather
UI-based CompositionBottom-UpOrder ListTop Region2. PlaceNavigationBottom Region1. ResolveSearchWeather
UI-based CompositionTop-DownOrder ListTop RegionBottom RegionSearchWeather
Inter-View Communication
Inter-View CommunicationStandard .NET eventsSearch ModelChild model raises eventParent model forwards eventResults ModelCriteria Model
Inter-View CommunicationEvent AggregatorResults ModelCriteria ModelhubPublishHandlePublishHandleAdvert ModelRecent Searches Model
Event AggregatorAdvantages:Automatic thread switchingWeak eventsHook for cross-cutting concerns
Dependency Injection
Dependency Injection
Partitioning
PartitioningSplitting partitions:By SKUBy featureBy teamBy department
PartitioningManaging partitions:With solutionsWith projectsWith assemblies
PartitioningResolving:Hard-codedConfigDiscovery
PartitioningAlso consider:Deployment and patchingInter-partition dependenciesDev time vs. build time partitioning
PartitioningRemember: assemblies are like waternecessary for life……but too much can kill you!
Leveraging XAML
Abstractions<Grid>   <..>   <Label Grid.Row="0" Grid.Column="0"        Content="First Name:"        Target="{Binding ElementName=FirstNameTextBox}"       />   <TextBoxGrid.Row="0" Grid.Column="1"       Name="FirstNameTextBox"       Text="{Binding Path=FirstName}"       /></Grid><Form>    <Field For="{Binding Path=FirstName}" />    <Field For="{Binding Path=LastName}" />    <Field For="{Binding Path=EmailAddress}" /></Form>
Consistency<TextBlock   Foreground="Red"  Text="Please enter..."   /><TextBlock   Foreground="{StaticResourceColor.Bad}"  Text="Please enter..."    />
Style Catalogues<TextBox Width="300" .../><TextBox Width="156" .../><TextBox Width="215" .../><TextBox Style="{StaticResourceTextBox.Big}" /><TextBox Style="{StaticResourceTextBox.Small}" /><TextBox Style="{StaticResourceTextBox.Medium}" />
BehavioursConsider this:Developers don't write code; they build tools for designers
Performance Considerations
Performance ConsiderationsRetained scene vs. Immediate ModeVirtualization (data and UI)Memory leaksThird party componentsPerformance test from day 1
Q&ALinks:http://www.codeplex.com/CompositeWPFhttp://magellan.codeplex.comhttp://www.galasoft.ch/mvvm/getstarted/http://caliburn.codeplex.comPaul Stovellpaul@paulstovell.comwww.paulstovell.com

More Related Content

PPT
Silverlight vs WPF
PPT
An Overview Of Wpf
PDF
Understanding the Windows Desktop App Development Landscape + Top 10 WPF Po...
PPT
Architecting For Ux
PDF
Cloud Apache OpenOffice based on HTML5
PDF
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
PPTX
Windows Presentation Foundation & XAML
PPT
Windows presentation foundation
Silverlight vs WPF
An Overview Of Wpf
Understanding the Windows Desktop App Development Landscape + Top 10 WPF Po...
Architecting For Ux
Cloud Apache OpenOffice based on HTML5
PLASTIC 2011: "Enterprise JavaScript with Jangaroo"
Windows Presentation Foundation & XAML
Windows presentation foundation

What's hot (18)

PPT
PPT
Introduction To Silverlight
PPT
Flex vs HTML5
PPTX
Windows Presentation Foundation
PPTX
Windows Presentation Foundation
PDF
Conociendo el ecosistema de Windows Phone 8 y Windows 8
PPT
Apache Flex: Overview
PPTX
Open Source examples from Adobe : Oscon kiosk
PPT
Opening the mobile web mozilla and firefox os-chit thiri maung
PPTX
Sys02 best way to create a share point app
PPTX
Silverlight 4 @ MSDN Live
KEY
Getting Started with Flex and PHP
PPT
Flex 4 Overview
PPT
Adobe flex an overview
PPTX
Expression studio overview_MVP Kok Chiann
PPTX
Silverlight
PPT
EDMUG Silverlight Talk
PPT
Buzzword, How'd They Build That?
Introduction To Silverlight
Flex vs HTML5
Windows Presentation Foundation
Windows Presentation Foundation
Conociendo el ecosistema de Windows Phone 8 y Windows 8
Apache Flex: Overview
Open Source examples from Adobe : Oscon kiosk
Opening the mobile web mozilla and firefox os-chit thiri maung
Sys02 best way to create a share point app
Silverlight 4 @ MSDN Live
Getting Started with Flex and PHP
Flex 4 Overview
Adobe flex an overview
Expression studio overview_MVP Kok Chiann
Silverlight
EDMUG Silverlight Talk
Buzzword, How'd They Build That?

Similar to Architecting WPF Applications (20)

PDF
Dot net training bangalore
PPT
D22 portlet development with open source frameworks
PPT
D22 Portlet Development With Open Source Frameworks
PPT
MSDN Unleashed: WPF Demystified
PPT
Shine a Light with Prism (the Composite Application Guidance for WPF and Silv...
PPTX
Application Lifecycle Management with TFS
PPTX
Get Started with JavaScript Frameworks
PDF
黑豹 ch4 ddd pattern practice (2)
ODP
Drools & jBPM Info Sheet
PPTX
Whats New In 2010 (Msdn & Visual Studio)
ODP
* DJANGO - The Python Framework - Low Kian Seong, Developer
PDF
Best training institute
PDF
Training institute in Bangalore
PPTX
ASP.NET MVC Presentation
PPT
XRX Presentation to Minnesota OTUG
PDF
Maintainable Javascript carsonified
PPTX
Mvvm pattern
PPT
Building Data Centric Apps in WPF
PPTX
Overview of VS2010 and .NET 4.0
PPT
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Dot net training bangalore
D22 portlet development with open source frameworks
D22 Portlet Development With Open Source Frameworks
MSDN Unleashed: WPF Demystified
Shine a Light with Prism (the Composite Application Guidance for WPF and Silv...
Application Lifecycle Management with TFS
Get Started with JavaScript Frameworks
黑豹 ch4 ddd pattern practice (2)
Drools & jBPM Info Sheet
Whats New In 2010 (Msdn & Visual Studio)
* DJANGO - The Python Framework - Low Kian Seong, Developer
Best training institute
Training institute in Bangalore
ASP.NET MVC Presentation
XRX Presentation to Minnesota OTUG
Maintainable Javascript carsonified
Mvvm pattern
Building Data Centric Apps in WPF
Overview of VS2010 and .NET 4.0
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
SaaS reusability assessment using machine learning techniques
PDF
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
PDF
Examining Bias in AI Generated News Content.pdf
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
Identification of potential depression in social media posts
PPTX
Rise of the Digital Control Grid Zeee Media and Hope and Tivon FTWProject.com
PDF
substrate PowerPoint Presentation basic one
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Launch a Bumble-Style App with AI Features in 2025.pdf
PPTX
How to Convert Tickets Into Sales Opportunity in Odoo 18
PPTX
How to use fields_get method in Odoo 18
PDF
Human Computer Interaction Miterm Lesson
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PDF
NewMind AI Journal Monthly Chronicles - August 2025
NewMind AI Weekly Chronicles – August ’25 Week IV
SaaS reusability assessment using machine learning techniques
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
Examining Bias in AI Generated News Content.pdf
Advancing precision in air quality forecasting through machine learning integ...
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Co-training pseudo-labeling for text classification with support vector machi...
Rapid Prototyping: A lecture on prototyping techniques for interface design
Identification of potential depression in social media posts
Rise of the Digital Control Grid Zeee Media and Hope and Tivon FTWProject.com
substrate PowerPoint Presentation basic one
giants, standing on the shoulders of - by Daniel Stenberg
Launch a Bumble-Style App with AI Features in 2025.pdf
How to Convert Tickets Into Sales Opportunity in Odoo 18
How to use fields_get method in Odoo 18
Human Computer Interaction Miterm Lesson
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
CEH Module 2 Footprinting CEH V13, concepts
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
NewMind AI Journal Monthly Chronicles - August 2025

Architecting WPF Applications