DEEP DIVE MVVM Laurent Bugnion Director, UX Integration IdentityMine
LAST YEAR WE…
Page : 1.Talked about the history of MVVM 2.Cleared some confusion 3.Refactored a non-MVVM application 4.Made it Blendable 5.Talked about additional components 6.Did a more complex demo 3© 2011 IdentityMine Inc. All Rights Reserved.
AND THEN CAME THE QUESTIONS…
Page : Q How do you avoid redundancy? How do you start animations? How do you show dialogs? How do you do navigation? How do you handle multiple VMs? How do you test your VMs? 5© 2011 IdentityMine Inc. All Rights Reserved.
Page: © 2010 IdentityMine Inc. All Rights Reserved.6
Page: © 2010 IdentityMine Inc. All Rights Reserved.7
DEMO Connecting to JSON
Page : VIEWMODEL VIEW © 2010 IdentityMine Inc. All Rights Reserved.9 ViewModel View Complicates the testing, hard coupling Hard to design and tweak MessageBox Animations Navigation
Page : VIEWMODEL VIEW © 2011 IdentityMine Inc. All Rights Reserved.10 Behaviour Binding Loose coupling, more flexibility Behavior is highly Blendable ViewModel View
Page : INJECTING VIEW SERVICES © 2011 IdentityMine Inc. All Rights Reserved.11 ViewModel IDialogService DialogService View injection INavigationService injection action NavigationService
DEMO Behaviours Injecting View Services Navigation
Page : INJECTING VIEW SERVICES © 2011 IdentityMine Inc. All Rights Reserved.13 ViewModel IDialogService DialogService View injection INavigationService injection action NavigationService
Page : TESTING THE VIEWMODEL © 2011 IdentityMine Inc. All Rights Reserved.14 ViewModel IDialogService DialogService View MockDialogService Unit Test
Page : TESTING THE VIEWMODEL © 2011 IdentityMine Inc. All Rights Reserved.15 Unit test on WP7 cheat sheet: sheet-for-unit-testing-silverlight-apps-on- windows-phone-7 sheet-for-unit-testing-silverlight-apps-on- windows-phone-7
DEMO Unit Testing ViewModels Mocking Services
FURTHER INFORMATION #deepdivemvvm
Please fill out your evaluation forms…
THANKS!