Sunteți pe pagina 1din 81

Name Title Company Session Code

Ward Bell V.P. of Technology IdeaBlade, inc ARC310

More More More

PRISM - izing

PRISM
Composite Application Guidance for WPF & Silverlight

Patterns Conventions Examples

Code

Model-View-ViewModel Shell Bootstrapper Dependency Injection Regions Modules Event Aggregator Commanding

Persistence Repository Service


RIA Services Entity Context Manager

HEY!
Youre only using two members?

One ViewModel Two Views !

or even WPF

TIP
Easier to reuse ViewModel if it doesnt know the View

UI in one
TM

project

Introduce the shell


the rest is infrastructure

Free the module

Add new module

App.xaml Guidelines
App start/stop App-wide resources

Above all ignorant of UI

Shell Guidelines
Visual host No smarts

Ok, wise guy!


SOMEBODY has to do some work.

Bootstrapper

Create Shell Configure Launch Get out of the way !

No Shell_Loaded; no code-behind.

2
3 4

Create Shell Create View and ViewModel Add View to Shell Show the shell

3 classes instead of one. This is .. better?

UnityBootstrapper
Prism Services

Module Loading
Dependency Injection

UI in one
TM

project

Introduce the shell


the rest is infrastructure

Free the module

Add new module

from Bootstrapper

Give me the Customer orders !


New Module New M-V-VM New Persistence Service

Module Guidelines
Configure Launch Get out of the way !

Module Sync
?

Problem
Module Independence

Module Load Order

MODULE
CustomerOrdersModule

Infrastructure Assemblies
ModuleExplorer.Infrastructure Prism DevForce

Own Assemblies

Other Module Assemblies


MevModule

Wires up UI element events

ICOMMAND ?
Wires events Handles enabled

We can write that

Tip
Use Prisms DelegateCommand<T>

Less code-behind ?
We can do that with Prism Commanding

No more AddHandlers!

Learn More
Prism
S/W & docs MSDN

www.codeplex.com/compositeWpf www.microsoft.com/compositeWpf

IdeaBlade DevForce
Data services

www.ideablade.com AskWard@ideablade.com

Resources
www.microsoft.com/teched
Sessions On-Demand & Community

www.microsoft.com/learning
Microsoft Certification & Training Resources

http://microsoft.com/technet
Resources for IT Professionals

http://microsoft.com/msdn
Resources for Developers

www.microsoft.com/learning Microsoft Certification and Training Resources

Related Content
Breakout Sessions (session codes and titles)

Interactive Theater Sessions (session codes and titles)

Hands-on Labs (session codes and titles)

Hands-on Labs (session codes and titles)

Track Resources
Resource 1

Resource 2

Resource 3

Resource 4

Complete an evaluation on CommNet and enter to win!

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.

S-ar putea să vă placă și