First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

Still not officially announced by anybody inside Microsoft, but quietly this morning the first preview of ASP.NET MVC 3 appeared on Microsoft Download.

And it’s exactly what everyone was expecting after last month’s announcement of Scott Guthrie of Razor, the new view engine for ASP.NET MVC.

What else does this new version bring to the table?

First of all it takes a dependency on .NET4. It means that you cannot be able to use it unless you migrate you applications to the latest version of the .NET framework (and if the story repeats itself, with the RTM coming out next year, this won’t be a big deal). And it also means that finally the framework can use all the cool features of C#3, like the dynamic keyword and the new features of .NET4 like the new data annotation’s attributes

  • Razor: already announced a few weeks ago by ScottGu, it’s a new view engine that tries to make it easier to mix code and HTML
  • Dynamic View and ViewModel: now you will be able to use “dynamic” view model and pass them to a view, without using the ugly hashtable approach. At the end of the day it’s still the same thing (no compile-time checking) but at least you don’t see all that ugly “magic strings” around
  • Global Filters: in ASP.NET 2, if you need to apply a filter to all your controllers you have to apply it to you own base controller, and have all your controller inherit from it (actually you could also apply the same attribute to all your controllers if you like writing lot of repetitive code). Now you can just register the global filters in the application startup, just like you do now with the modelbinders or view engines and so on
  • Dependency Injection support: this is probably the most important feature introduced with this release: the ability to use your favorite IoC Container (using the Common Service Locator) to create controllers, factories, views, filters and so on. Brad Wilson has a great series of posts about that.

It was just a very quick recap: I’ll follow-up with a more detailed post in the next days.

Now, run and download the preview and play with it.

posted on Tuesday, July 27, 2010 3:45 PM

Comments on this entry:

# re: ASP.NET MVC 3 Preview 1 is out

Left by anirudha at 7/27/2010 4:23 PM

Very Very thanks ! simone

# re: ASP.NET MVC 3 Preview 1 is out

Left by Slava at 7/29/2010 12:35 PM

Good news, Haacked can say more about this here: http://haacked.com

I like approach without Hashtable, but it is interesting how they will make it easy to use with new fields. For example Message and Title already there, but if I want to add some FirstName, How I will to this?

Comments have been closed on this topic.