I am fond of MVC. I have done my fair share of Java programming for the Web, and this pattern is nearly ubiquitous in Java-based Web frameworks; I have used Struts quite a bit, and I used it as the basis for the 2004 Olympic Games Web site. Spring, WebWork, are other Java MVC frameworks. I find it fascinating that such an old pattern, dating back to the Xerox Smalltalk era (1979, says WikiPedia), is so well suited to developing applications for the Web.
Microsoft has followed a very different path with its ASP.NET Web Forms framework. Their goal was not to select and utilize a pattern that would match the actual implementation of the Web, with its HTTP/HTML duality that closely matches the Controller and View layers… The goal was to abstract this implementation completely, and reproduce a programming model that would match their most popular programming environment, Visual Basic.
In this sense, ASP.NET Web Forms are simply amazing. You can forget completely about HTML forms and HTTP query parameters, hiding input fields to maintain state, etc. Everything is taken care of for you. You can start programming for the Web exactly as you did in VB for Windows applications. It’s very clever.
However, I have always been a little bit uneasy around ASP.NET Web Forms compared to an MVC environment, probably because I don’t have a VB background, but rather a pure Web past, i.e. I started writing CGI scripts for NCSA Server way before Apache even existed, and I think my first CGI scripts were written in Unix shell scripts, before I discovered Perl.
It seems I’m not the only one to find some shortcomings to ASP.NET Web Forms, and MVP Rick Strahl describes his view in detail in this blog entry: What’s Ailing ASP.NET Web Forms – Rick Strahl’s Web Log.
This is why I am very interested by the new ASP.NET MVC Framework that Scott Guthrie announced in October. I think it looks like a fantastic tool to build complex Web sites, and it will allow ASP.NET developers to use a very mature and well-known architectural pattern for their Web developments. I will try to get my hands on the public preview as soon as it’s available, hopefully before the end of the year.
(cross-posted to my personal blog)