Two weeks ago I blogged about a new MVC (Model View Controller) framework for ASP.NET that we are going to be supporting as an optional feature soon. It provides a structured model that enforces a clear separation of concerns within applications, and makes it easier to unit test your code and support a TDD workflow. It also helps provide more control over the URLs you publish in your applications, and can optionally provide more control over the HTML that is emitted from them.
You’ll be able to start a new MVC web app in Visual Studio by selecting File -> New Project and then selecting ASP.NET MVC Web Application template to create a new web application using it. It’s compatible with any .NET unit-testing system (such as NUnit, MBUnit, MSTest and XUnit) and its deafult directory structure features three main directories named
/Controllers — you get three guesses as to what goes in them. Easy setup of new projects, support for testing, a directory structure that gives you Rails deja vu — this should be an interesting project to follow.
Take a close look at the screenshot below and note the URL: it’s of the form
/localhost/controller/action/id, an URL routing scheme that Rails coders should find very, very familiar:
I’m just skimming the surface here; Scott goes into considerably greater detail. I’ll be following the project with great interest and taking it for a spin once it becomes available to Visual Studio users.