ALT.NET Conference Austin — Day 2: Introducing Microsoft’s MVC Framework

by bob on October 6, 2007

I feel sorry for the people running sessions in the same time slot as Scott Guthrie’s presentation. Someone came into the room from next door and reminded everyone that they were having a session on Java. Someone called out, “thanks for dropping by, Java Guy!”

Scott says that the goal of the MVC framwork is to integrate with and coexist with ASP.NET, yet allow a very high level of customization / mockability / pluggability. It coexists with other frameworks such as Castle MonoRail, if that’s your preference.

The MVC framework provides a URL routing / mapping engine that uses a default pattern of controller/action/parameter, e.g., customer/delete/4 — but it’s very flexible and customizable. It’s also designed to allow generation of outbound URLs so that you don’t end up with hard-wired URLs in your code.

The Visual Studio templates will initially support your choice of nUnit, mbUnit, or MSTest as your testing framework.

Add-ons, libraries, and plug-ins for the MVC framework will be available on CodePlex and the current plan is to test logical groups of such add-ons to certify that they all work correctly with the framework and with each other (although you would not be obliged to use all of them at once).

The default controller does not support postbacks, but you can, if you choose to use the default ASP.NET templating engine, utilize UserControls to implement pieces of the UI. Using the ASP.NET templates gives you all the functionality that normally goes along with those, such as localization support.

What followed was far too rapid-fire to relate in great detail but it struck me as quite appealing compared to the drag and drop WebForms environment, which has never appealed to me. It’s sure going to get serious consideration for the next greenfield web app I do, and if it coexists peacefully with existing ASP.NET code it may have potential to be a way to get control of some of the rangy existing apps that I’ve inherited. Supposedly, one can mix WebForms with MVC within a single app.

The first public builds should be available on the web “within the next 6 to 8 weeks”. It will ulitmately ship in a VS 2008 service pack, and will be a fully supported option with its own templates, etc. It will continue to be supported and enhanced side-by-side with standard ASP.NET.

The next post in this series is here.

Previous post:

Next post: