The problem with the ASP.NET MVC Revolution
Many years ago I lived in a Communist country. I grew up there. All children growing up in this Communist country had to learn about various Revolutions in history. Most dominantly the October Revolution in Russia that overthrew the Czar and established a Communist government. So it can be said that I have some idea of what it takes to make a Revolution.
Having spent some time with ASP.NET MVC – the revolutionary ” new ” direction of ASP.NET software development I have a few observations:
ASP.NET MVC is more than just the code necessary to make MVC compliant apps in C#. Seriously. It is a lot more. Just as the .NET System.Web namespace put a wrapper around HTML so does ASP.NET MVC. Its not as deeply permeated as the regular Webform system but there is still an awful lot more to this implementation than simply the code needed to run an MVC app.
Here is the deal – in order to have a plain and simple MVC you don’t need all the stuff provided by ASP.NET MVC. Basically you need a bit of dependency injection (just a few lines), an Action Framework and Routing Structure. That’s it.
Of course ASP.NET MVC has all that – and I must say the Action Framework is done very nicely – but at the same time it also contains a fullfledged attempt to substitute an entirely new paradigm for the existing webform system. Consequently you have all sorts of wacky stuff going on like Views that look a look like tag soup , partial views that are similar to user controls, a magical way of passing data back and forth among the models, views and controllers and number of other features that are intended to make the system more testable.
I have spent several days so far building an internal test app on the ASP.NET MVC framework and I am here to tell you this is no walk in the park. Considering this is a released product, it strikes me as ironic that there are only a handful sample apps out there which contain any sort of complexity. There are a handful open source apps out there which range from absolutely pedestrian to entirely new generations of MVC that dont much resemble the MS release version (on the surface anyways)
In addition there seems to be a lot of flux in what is accepted as a good design and architecture. Several of the more prominent samples (Kobe, Oxite, MVC Commerce) are being rewritten based on extensive criticism by the OSS community. This begs the question who is the OSS community and how is it these folks have so much criticism of these products. I really hope its more than the handful of “usual suspects” in the .NET community. You know… the guys that like to congregate around the Alt.Net water cooler.
Here is my issue. When I am learning a new tool Ilook for definitive examples of good design and usage of that tool. And I just don’t see enough of those examples. Having 6 month old sample apps criticized as being incorrect architecture and in need of updates only adds to the frustration levels.
Consider how many millions of ASP.NET programmers there are in the world – heck the Indian sub continent alone can probably account for a few mill – the dearth of good ASP.NET MVC reference material is alarming. One would think that there would be more excitement around this stuff. Of course I don’t have the same visibility into acceptance rates as some of the MS Regional directors. Its quite a dilemma I think. For almost 10 years MS web technology has gone one way ( web forms) and now here comes this entirely different way of doing it. Like I said before, I am still waiting to see how ASP.NET 4.0 deals with routing (it still uses web forms). In the meantime I will keep plugging away at MVC.
One thing is for sure, in order for this Revolution to take hold there will need to be a much greater acceptance by the .NET community and that in turn requires more than a handful of books and a dozen sample apps. In the end I am not even sure that the greater developer community at large will switch to MVC as opposed to Silverlight. Yes MVC will always have its audience , but I am thinking along the lines of the thousands of corporate developers. These guys would have a hard time with yet another paradigm shift and the reward seems to be so much greater in the area of Silverlight apps for these fellows.
I sure hope that in time my posts about this framework will become more positive. I suppose that once I get past the frustrations there is a lot to like there.