Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Composite WPF
1. Composite Smart Clients with WPF
Composite Application Guidance for WPF – “PRISM”
Max Knor
Developer Evangelist
Microsoft Austria
http://www.knor.net/
2. Agenda
A solution for…
Complex WPF Applications
Developing in Modules
Composite Smart Clients
No introduction to WPF
2
5. Composite Smart Clients
Configurable
Extensible
Unified
Loosely Coupled
Experience
Communication
Shared
Central Services
User Interface
(Equilizer, Dolby...)
5
6. WPF Composite Application Guidance
Solution Package by Patterns & Practices Team
Available in Source
http://www.codeplex.com/CompositeWPF/
Reference Implementation (Stock Trader RI)
Composite Application Library (Framework)
Guidance (Documentation)
http://www.codeplex.com/CompositeWPFContrib/
Community Add-Ons
OutlookBar, Infragistics Support, …
6
7. Architecture of Composite Smart Clients
Main Application Module-Loader Svc.
Service / Dependency Injection Container
Shell ModuleEnumerator
Shell ModuleLoader
Region
Region Presenter
Region
Core-Services
RegionManger
Module Logging
View Presenter EventAggregator
Custom Module
Model Services
7
15. Modules
Grouped by UseCases, Functionality, …
No reference to the Shell
Shared Components
Services, Interfaces, … in Shared Libraries
Modules are dynamically loaded
At runtime
15
20. Implementing the Views
Seperation of UI, logic and data
Presentation
View Model
Model
Presentation Model
Responsible for data loading (from model)
Instantiates the view
View
Binding to PM‘s commands and data
20
22. Displaying views
Region manager is
needed
public class MyModule : IModule
{
public void Initialize (IRegionManager manager)
{
RegisterViewsAndServices();
Region is retrieved
IRegion orderRegion =
manager.GetRegion(quot;OrderRegionquot;);
var myOrderView = new OrderView(myOrder);
orderRegion.Add(myOrderView);
}
}
View is created
View is shown
22
28. Shell Extensibility
Modules can extend the shell with custom
toolbars
ShellWindow implements Interface
IExtendableShell
Access via UnityContainer
Modules are only aware of IExtendableShell
Breaking the dependency to shell implementation
28