110 likes | 625 Views
Practical MVVM. Joel Cochran. About Me. Expression Blend MVP. INETA Community Champion. MCTS ( WinForms & WPF). http://www.developingfor.net. mailto:joelcochran@gmail.com. twitter: @ joelcochran. http://speakerwiki.org/speakers/joel_cochran. Announcing Blend SIG. Virtual User Group.
E N D
Practical MVVM Joel Cochran
About Me Expression Blend MVP INETA Community Champion MCTS (WinForms & WPF) http://www.developingfor.net mailto:joelcochran@gmail.com twitter: @joelcochran http://speakerwiki.org/speakers/joel_cochran
Announcing Blend SIG Virtual User Group 2nd Wednesday of each month, 2pm EST Videos: http://vimeo.com/blendisg Presenters are deep Blend Experts http://blendsig.groups.live.com twitter: @blendsig Coming soon: http://blendsig.com
My Book! A developer’s guide MEAP available now http://manning.com/cochran Published Fall 2011
MVVM: Practical Magic? • Model, View, ViewModel • Similar to other MVx patterns • Big exception: 2 way communications between View and ViewModel • Allows true separation of concerns • Supports DataBinding • No Code Behind
MVVM Parts: Model The Data Data Services XML Files ADO.NET, LinqToSQL, EF Consumed by ViewModel(s) Unaware of View and ViewModel
MVVM Parts: View The Screen UI and UX Visual Representation of the Data WPF, Silverlight, WP7 Populated by ViewModel(s) Unaware of the Model Technically unaware of the ViewModel
MVVM Parts: ViewModel The Master & The Middleman Communications Management Data formatting Action items Unaware of View
MVVM Parts: ViewModel Model Model Data Source Model Entities Data Access Service ViewModel ViewModel ViewModel ViewModel Data Binding . View View View View Code Behind Code Behind Code Behind
The Practical MVVM Manifesto Must be simple and discoverable Must support Blend Must provide design time data Must be testable