I gave MVVM presentation at Consistel today. It was 2 hours long section and we had a lot of great discussions about MVVM pattern. Due to the problems with laptop and remote desktop, I was not able to show the demo in my session. I’m going to have another WPF session with my colleague “Nyi Nyi” tomorrow. Thanks to everyone who is attending my session. Especial special thank to Arpad and Maneesh for arranging this session and supporting me in my session.
- Understanding MVVM
- Motivation and benefits
- Implementing the pattern
- Dependency Injection and IoC
- Unit Test and Mock
- Supporting libraries and frameworks
- WPF MVVM Training.pptx (357 KB) (Office 2010 Format)
- WPF MVVM Training.ppt (760 KB) (Office 2003 Format )
Here is the list of things that I used in
- .NET 3.5
- Moq http://code.google.com/p/moq/
- Visual Studio Unit Test
- WPF MVVM Toolkit
- Unity http://www.codeplex.com/unity
You can also download the demo here. MVVMDemo.zip (5.34 MB) Note: Unity and Moq dlls are already included in zip file.
As I want to show the team how to write the test, I didn’t write anything for both View and Service. The test below are the BDD (Behavior-Driven Development) Style. There are a few BDD framework for .NET but I don’t really like any of them so I’m using VS Unit Test with BDD-style test. The main difference between TDD and BDD is that BDD focus more on specification and readability. (Some people said that BDD is TDD done right. :) )
Feel free to let me know if you have any question or comment. Thanks.