Monday, 11 July 2011

Screencast: Modular WPF with MEF & MVVM Tutorial Part 2

In Part 1, I showed how to create a very simple modular WPF application, and introduced MEF to allow us to easily add modules without changing any existing code.

In part 2, I introduce the MVVM pattern to show how we can make our applications more easily unit testable, by separating the view from the business logic. I also create some unit tests using the Microsoft unit testing framework and moq, and show how to perform code coverage analysis.

Incidentally, I normally use NUnit and TestDriven.NET instead of the Microsoft unit testing framework, which I find much simpler to use, and also supports code coverage analysis using NCover or the Visual Studio code coverage.

I do plan to follow this up with a third video, in which I replace the modules ListBox with some buttons to switch modules and show some of the typical problems you might run into when using MVVM.

8 comments:

Anonymous said...

any chance of a downloadable version?

Unknown said...

up can download it off vimeo - or did you mean the source-code? I'll get my mercurial repository up on bitbucket at some point

Pierre Mengal said...

I would like to download the source code as well. I'm sure I missed something (how you sync the view with the viewmodel events.

Unknown said...

I'll try to get the code uploaded when I do part 3

Rutix said...

Hey Mark! Great screencasts :). I was wondering if you were still going do a part 3. If you are not going to do a part 3 could you put the sourcecode online ?

Unknown said...

sorry, been busy over the summer, but I have planned the next one in this series so it will come eventually

Unknown said...

Nice tutorial and to the point.
any ideas when the 3rd part will be online?

Mathias said...

That was great! Helped me getting started with my unit testing. Keep them coming Mark :)