I’m spending the weekend at work (don’t ask), so I had some time to read some articles and view some webcasts I left behind. I finally got to watching the entire lecture Scott Guthrie gave at the ALT.NET conference about the ASP.NET framework. You can check out the video here, and read about in Scott’s blog, here.
My initial impression of this was: Wow. This is so awesome. Finally ASP.NET is becoming a testable, maintainable platform. As I’ve mentioned, my team has recently entered TDD. The only thing that is incredibly hard to test in our architecture are the WebForms pages. There are ways to overcome this, but none of them is natural because of one simple truth: WebForms has tight coupling between logic (.cs file) and view (.aspx file). Furthermore, the suggested way to test ASP.NET pages in VSTS requires using a web-server, and loading the entire ASP.NET, well, stuff. And that is all kinds of slow.
Using the MVC framework we will have testable controllers (which are just classes with some logic in them, which you can test like any other class), and views that are really responsible only for display. Also, everything will have an interface. Dear IHttpContext, how I’ve longed for you since the dawn of time.
It definitely seems like this will be the way to develop applications over ASP.NET (although standard WebForms will continue to be supported and developed, says Guthrie). My main concern is the transition between the two platforms. For the project, and for the team. For the project, we currently have the standard ASP.NET web site (which sucks. We now wish we had chosen Web Application Project. We sure do miss that .csproj file), and a whole bunch of .aspx files. System.Web.MVC will work in an entirely different way: Controllers will have several views, no post-back, no view-state. Moving will probably be incredibly hard.
For the team this will also be difficult. We are so accustomed to working with the control life-cycle model, using and writing server-controls that handle their state, that this will probably take us a long way back in terms of productivity, initially. In fact, none of us developed web applications in anything other than ASP.NET, so the "step back" that the MVC framework takes towards working more closely with HTML might be problematic.
But problems aside, I really can’t wait to get my hands on this framework and start playing with it. It feels very right, and seems to me like a step in the right direction by Microsoft.