Possible Duplicate:
Biggest advantage to using ASP.Net MVC vs web forms
In Model View Controler, I read in one of the articles about asp.net mvc, that testing is easy in MVC -- how? Can anybody explain to me, or any reference?
Possible Duplicate:
Biggest advantage to using ASP.Net MVC vs web forms
In Model View Controler, I read in one of the articles about asp.net mvc, that testing is easy in MVC -- how? Can anybody explain to me, or any reference?
The key testability advantage ASP.Net MVC has over ASP.Net Webforms is a feature of the MVC pattern itself: separation of concerns. The platform pushes the business logic (models), program logic (controllers), and UI (views) towards separation, so that they can be tested (unit tested, that is) separately.
There are also indications that Microsoft's version of MVC is designed with testability in mind. For example, MVC classes like the Controller and HttpContext implement an interface, which makes it easier to mock them in unit tests.
Of course, using ASP.Net MVC doesn't guarantee a testable application (although it does make it easier). Likewise, using Webforms doesn't prohibit one (although it's easier to end up with untestable spaghetti code without separation of concerns enforced). As always, using a test-driven approach is more important than which platform you're using.
There are lots of Q&A is available already on this portal regarding to your questions. Some of them are:
You can fin more. For next time before posting any question just check it once whether it's already discussed or not.