One of the things I did looking at the MVC RC2 was see what’s involved in converting the “New Project” template from .aspx to .spark - it’s an exceptionally smooth migration.

For starters all of the the view files are standalone files with no code behind, which let’s you change the extension as a starting point.

The biggest difference is Shared/Site.Master was renamed and moved to Layouts/Application.spark… It could have stayed in Shared, but it seems a bit more specific to me. You’d also probably throw an underscore onto the file that’s used as a partial.

Because <% stmt %> and <%= expr %> are supported, if you’re using the Html helpers number of things you need to change in a view is remarkably small. Getting rid of the page declaration, and altering the named content parts, more or less covers it.

Before:

After:

The layout itself can be changed nearly as easily.

Before:

After:

Well, you get the idea. You’ll also need to add the namespace System.Web.Mvc.Html using a shared/_global.spark file, or the section in web.config, or by adding it to the template files.

Eventually you would also want to switch from a aspx-centric file appearance to a spark-centric one, but from the standpoint of migrating an existing app it probably gets you off the ground pretty quickly.

In the interest of completeness here’s the LogOnUserControl partial.

Before:

After: