As I observe the reactions across the Internets about the forthcoming ASP.NET MVC framework, there seem to be two general reactions: those that can't wait to get their hands on the MVC framework and see this release as long over due, and those that don't see the point of rocking the WebForms boat. When I first heard about the new framework, I must admit that I fell in to the later camp. What would a new MVC framework let me do that I can't do (with all my years of experience and 3rd party tools) faster with WebForms?
Not satisfied to ignore the issue, I dug deeper and tried to learn all there is to know about the yet to be released framework. Along the way I learned some very cool facts about ASP.NET MVC that have moved me from one camp to the other. I'm now very excited about trying ASP.NET MVC and looking forward to the first preview bits that should be available in a couple of weeks. But I know there are many of you out there that still don't see the point of ASP.NET MVC, so I decided to provide the answers to some the questions I had before doing my research to help you see why ASP.NET MVC might be worth adopting. My goal is not to convince you that ASP.NET MVC or WebForms is better, but simply to help you, the overloaded programmer that is still trying to fully grasp WPF, WF, WCF, XAML, and Silverlight, quickly understand some key facts about the new ASP.NET tool.
My personal FAQS
How hard is it going to be to learn ASP.NET MVC?
There is no two ways about this aspect of ASP.NET MVC: it will have a learning curve that will require some time to master. ASP.NET MVC is a radical shift from the "traditional" ASP.NET method of page programming, where code and markup are (relatively) tightly coupled. Instead, "controller" classes will handle all of the processing logic and be wired to any number of "views" that render markup. Gone are the concepts of page postback (to itself, at least), code behind/beside, and (this is a big one) the page lifecycle.
But before you think this is the end of world and abandon interest in ASP.NET MVC, remember back to the days when you transitioned from ASP classic to ASP.NET. At that time, the strange world of "WebForms" seemed bizarre, with "code behind" pages, this crazy thing called "ViewState", and a complex "page lifecycle" to learn. "How could I leave my inline coding and top-to-bottom page evaluation to learn this fancy ASP.NET?" we thought. It didn't take long, though, for ASP developers to quickly understand the benefits ASP.NET brings to the table and flock to the new technology. So it may be again with WebForms and ASP.NET MVC.
While a lot is changing on the processing end of ASP.NET, many familiar concepts will continue to exist in MVC. Things like masterpages, themes, UserControls, ServerControls, and services like Membership and Profile will all be present and accounted for. Even ASPX pages survive as a valid way to create MVC Views. Some changes will clearly be required for ServerContorls (especially complex ServerControls like those that Telerik makes) to work in the new page lifecycle-less environment, but for the programmer using the controls these changes should be relatively transparent. The key change in MVC vs. WebForms is where the framework processes its logic and renders its markup. Not how.
Besides bringing MVC to ASP.NET, what's so special about ASP.NET MVC?
One of the biggest advantages of the ASP.NET MVC framework is that it will make ASP.NET applications much easier to test. Unit testing ASP.NET applications today can be a challenge since many objects in an application require the HTTP context to function properly. You can get around that requirement by implementing mock objects, but that is especially difficult when the objects needing the mocking are not based on interfaces. In ASP.NET MVC, all core APIs and contracts are interfaced so you can easily build your mock objects and run fast tests against your ASP.NET code. Hopefully some of this benefit can be back-ported to WebForms in the future.
Also in the realm of testing, the ASP.NET MVC framework does a much better job of enforcing clean separation of processing logic from UI markup. This is an inherent benefit of most MVC frameworks, so it should go without saying for ASP.NET MVC. Nonetheless, it will take what "code behind/beside" tried to do for the separation of logic and markup in WebForms to the next level and help ASP.NET developers enforce clean separation.
Beyond testing improvements, the MVC framework is also introducing some very interesting URL processing models for ASP.NET developers. In the past, if you wanted to use a URL like "/products/beverages/beer" you would need a URL rewriter (at the IIS level, in fact) to make it happen. Under the hood, the URL would really be something like "/products/detail.aspx?cat=1&id=20" and you'd use Request.QueryString to extract the values. With ASP.NET MVC, clean URLs are the norm and they have tight integration with the MVC controllers. For example, if an ASP.NET MVC app has the URL "/Products/Details/5", it automatically execute the "Details" method in the "Products" controller and passes the value "5" to the method as an input parameter. Pretty cool stuff!
Is it an either or decision: WebForms or ASP.NET MVC?
No. You can have an application that uses both WebForms and ASP.NET MVC. ASP.NET MVC is not replacing WebForms; it is simply another tool in the ASP.NET developer's toolbox to help them develop (and test) quickly and efficiently. But remember the age old truth: just because you can doesn't mean you should. I'd suggest you avoid the Frankenstein blended apps (like mixed ASP classic/ASP.NET apps) if you can.
What about my 3rd party UI components? Are they still usable?
Maybe, but in most cases UI controls (like those that Telerik makes) will probably have to be "tweaked" for the MVC environment. Operations that currently postback to the page (like sorting a RadGrid, for instance) will not work in the lifecycle-less MVC approach. But have no fear, Telerik is eagerly awaiting the preview bits for ASP.NET MVC so we can run our tests and determine exactly what you'll need to have the same level of productivity in an MVC environment (as I am sure other component vendors are doing, too).
Okay, this MVC thing sounds interesting. Can I download some bits?
Not yet, but according to a recent statement from Scott Guthrie, the first preview bits for the MVC framework should be available within the next couple of weeks. That means by the week of December 10th, you should be able to download the ASP.NET MVC framework and get your hands dirty with the approach to ASP.NET. Consider it an early Christmas present. It's up to you whether you'll consider it a lump of coal or beautiful diamond.