Let’s just say, for arguments sake, that you’ve run across a piece of code that is tightly coupled, i.e. there are lots of hard links between classes, it’s hard to test, changes are difficult, the code breaks when it shouldn’t, etc.  Let’s also say, for arguments sake, that you want to improve the design of that code and make it somewhat more maintainable so that you don’t spend the rest of your natural life trying to keep the code from completely falling apart.

How would you do that?

In this screen cast I’ll walk through a sample application, show where the tight coupling occurs and how to remove it.  In the process I’ll also be cover a bit of unit testing vs integration testing, mock frameworks, and inversion of control containers (Unity in this case).

Hopefully you get some value from it.

Download the WMV (93Mb, 44mins)

Double click for full screen

References:

For those interested in the Visual Studio add-ons they saw, I am using:

Finally, the video is hosted at http://silverlight.live.com.