In the first three parts of this series I talked about some
major aspects of MVC pattern, ASP.NET MVC Framework and KBlog (the simple blog
engine that is being created in this series as a showcase). So far, I discussed
controller and data model as two of the three main components in Model View
Controller (MVC) pattern.
The main reason for the popularity and demand for MVC
pattern among web developers (not only ASP.NET developers) is the fact that MVC
enables testing capabilities for developers to easily test their web
applications. So MVC brings Test-Driven Development (TDD) to web applications, which
is a very common and popular way to develop software these days.
Of course, there are some ways to unit test your traditional
web applications, but things get much easier with MVC pattern.
The topic of this part and the next part is unit testing. In
MVC pattern you can test your application easily and just by testing your
controller classes. Here I show you how to unit test your MVC applications, but
before that we need to get started with some theoretical concepts in this part.
Before digging into the main body of this part, let me point
out that the first three parts of this article series were written based on the
first public version and CTP of ASP.NET MVC Framework while this part is
written based on the second CTP that you can download from here.