2. Mahender Sarangam Having 5 years of experience on .NET Technologies. Working as a Senior Software Engineer in United Health Group (UHG India Information Service Ltd.). Worked with Big Firms like Deloitte Consulting & Wipro Technology. Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. MCTS Certified in Web Technologies. Blog : http://Msarangam.wordpress.com
3. Why Do need Pattern Everything in code behind, is not a good idea
4.
5. Why Do need Pattern Basic Motivation of separation pattern Removing logic from Code behind Interchanging UI screens Create Unit test case foe logic and UI Developers and Designers can work parallel. Model never needs to be changed to support changes to the view No duplicated code to update views So what is MVVM ? Its variation of MVC pattern John Gossman from WPF team Resources from external assemblies Martin Fowler's Presentation Model (PM) pattern
12. Keep the view as simple as possible.Uses Binding to “subscribe” to the ViewModel Interprets business data and state of ViewModel to the human Nothing but Presentation - XAML No or minimal code-behind
16. No strong or weak (via Interface) reference of View
17. Make VM as testable as possible (e.g. no call to Singleton class)
18. No Control related Stuff in VMProvides data to and from the View Responds to both the View and the Model Informs the View of changes in the data Reusable (at least much more than code behind a form)
19.
20. No reference to View ModelTypical class that covers a database Could be a WCF Service and its client reference