Windows Phone 7 Silverlight MVVM App the Test-Driven

Preview:

DESCRIPTION

Windows Phone 7 Silverlight MVVM App the Test-Driven

Citation preview

Windows Phone 7 Silverlight MVVM App the Test-Driven Way

Mark TuckerDesert Code Camp, May

2010

Windows Phone 7

Application Platform

3 Screens + Cloud

Standardized Hardware

• WVGA (800x480), capacitive 4-point multi-touch screen

• DirectX 9 hardware acceleration • Sensors - GPS, accelerometer, compass,

light, proximity • Camera• Buttons – Start, Search, Back• Connectivity – cell & Wi-Fi• 256 MB (or more) of RAM and 8 GB (or

more) of flash storage

MVVM

Model View

ViewModel

Commands

DataBinding

TDD

REDGREE

NREFACTOR

Silverlight Unit Testing Framework

• Used by Silverlight Toolkit http://code.msdn.microsoft.com/silverlightut

• WP7-specific build http://jeffatmix.com/

• MIX10 session – CL59• Based on Microsoft Unit Testing

framework

MVVM Light Toolkit

• View• ViewModelLocator• ViewModel• RelayCommand• EventToCommand• Messenger

Design – nba tracker

Design – nba tracker

© 2005-2009 Clarity Consulting

http://blogs.claritycon.com/blogs/design/archive/2010/04/01/designing-for-win-phone-7.aspx

Design – quick journal

Map to MVVM

MainPage (View) MainViewModel

ApplicationTitle

ListName

Notes

ShowDetailCommand(note)

Binding

Command

Map to MVVM

DetailView DetailViewModel

ApplicationTitle

ListName

ShortDate

SaveDetailCommand

Binding

Command

Text

CancelDetailCommand

DEMO

• Phone Parallax – Panoramic • Picture Viewer – Panoramic• Weather Forecast – Pivot • MEF, MVVM• Quick Journal

Resources• Developer Portal

http://developer.windowsphone.com/– UI Design and Interaction Guide– Application Bar Icons

• MIX10 Sessions (15 total) http://live.visitmix.com/Sessions#/tags/WindowsPhone

• Training Kit http://channel9.msdn.com/learn/courses/WP7TrainingKit/

• UI Design Templates http://www.shazaml.com/archives/windows-phone-7-ui-templates

• Free e-book by Charles Petzold http://www.charlespetzold.com/

• Twitter @wp7dev

Timeline

• March 15 – announcement at MIX10• April 12 – VS 2010 release• April 29 – Refresh for VS 2010• 6 months to develop some COOL

apps• Holiday 2010 – Phones available

Contact Me

• Twitter: @marktucker• Blog: www.shazaml.com