I\'ve now completed my first web application using ASP.NET MVC and overall, I still am not grasping why this is getting all the praise and glory. Maybe I\'m being stubborn. I k
Not a complete answer, but one big concern is testability of ASP.NET Forms, or the lack thereof. Testing the UI logic of what gets displayed and how. With ASP.NET Forms, you are left to just the codebehind.
Now, MVC isn't for everyone. You may want to look into MVP (Model-View Presenter) for ASP.NET Forms as it uses very similar MVC concepts, except the Presenter is in control of changing the view's internals.
But, testability is really a big plus for testing your code. Such as whawt happens when someone clicks the ChangePassword method/action:
[TestClass]
public class AccountControllerTest
{
[TestMethod]
public void ChangePasswordPostRedirectsOnSuccess()
{
// Arrange
AccountController controller = GetAccountController();
// Act
RedirectToRouteResult result =
(RedirectToRouteResult)controller.ChangePassword(
"oldPass", "newPass", "newPass");
// Assert
Assert.AreEqual("ChangePasswordSuccess"
, result.RouteValues["action"]);
}
}