This post outlines some of my experiences moving from ASP.Net web forms to the new ASP.Net MVC framework coming from Microsoft. There is plenty of talk about all the advantages of the new framework but it comes at a price.
The Microsofties are being quite clear that the new framework isn't for everyone and that the old one isn't going away. I still use both and which one is better is way too subjective for anyone but you to answer. Many of my projects will continue to use the old model, particularly if the project sounds like this:
This describes a lot of the quick marketing style sites that I do. For some of my new projects I'm moving the the new MVC framework. There is a large gray area in between but I will prefer the new framework for the following sorts of projects:
Now before I make anyone angry, yes you can do a great job of large complex projects using the web forms model, I just hate doing it.
If you're like me and you've never worked with a similar framework before (for example MonoRail or Rails) you're suddenly going to find yourself very unproductive as you relearn how to do all the things you've been doing for years in web forms. Here are some of the things you will want to spend time on:
Expect to spend a couple of weeks before you are really comfortable working with the new framework. The good news is that once you figure these things out you will be back to your old self again.
The new framework isn't really based on new ideas. In fact it's really built on tried and tested concepts, even if they are new to the average Microsoft developer. Here are some things from my past experience that help ease my transition:
The framework is still in beta so it's not done and there will be changes. The core feels very solid and I haven't encountered any major bugs that have stopped me. More importantly realise that there is not yet good support from third party libraries to fill in the holes so things feel very bare bones in a lot of cases. One of the few resources out there is the MVC Contrib library.
Because the framework has already had 6 releases (5 previews, 1 beta) with breaking changes most of the information in blogs and forums is out of date and wont work exactly as described. Finding information on how things are now can be tricky and keeping Reflector nearby is recommended. The best information is still in Scott Gu's blog.
I'm starting to settle in with MVC and it feels good. My XHTML validates as strict and I haven't had to do anything remotely resembling a hack or fudge. The framework is extensible in so many ways that web forms isn't so the few things I haven't liked I've been able to change.
Yes, it's worth it.