160 likes | 298 Views
Creating Windows 8 MVVM Apps. Ash Tewari www.ashtewari.com @ashtewari. Demo. Structure and functionality of demo application. M-V-VM. Model View ViewModel. Why ?. WinRT/XAML Data Binding Data Templates Resources Commands. Why ?.
E N D
Creating Windows 8 MVVM Apps Ash Tewari www.ashtewari.com @ashtewari
Demo Structure and functionality of demo application
M-V-VM • Model • View • ViewModel
Why ? WinRT/XAML • Data Binding • Data Templates • Resources • Commands
Why ? Decouple View from its State and Behavior – Code is easy to understand, maintain, evolve and troubleshoot
Why ? Testability – Automated Regressions
Why ? Easily skin user interfaces
Why ? Designer/Developer Workflow – Allows Specialists to work on the same project without much friction
Demo Structuring the demo app to achieve separation of concerns
Take Away Model does not know about View and ViewModel.
Take Away ViewModel is an abstraction of the View. It encapsulates the State as well as the behavior of the View.
Take Away ViewModel implements INotifyPropertyChanged.
Take Away View.DataContext = ViewModel
Resources • BindableMapRT • http://bindablemaprt.codeplex.com/ • Win8nl utilities • http://win8nl.codeplex.com/ • MVVMLight Toolkit • http://mvvmlight.codeplex.com/ • JSON.net • http://json.codeplex.com/
Sample Application • Census Mapper • Main Branch https://github.com/ashtewari/CensusMapper • Soc Branch https://github.com/ashtewari/CensusMapper/tree/Soc
Feedback Ash Tewari www.ashtewari.com @ashtewari