Thursday, October 7, 2010

A first look at Microsoft ASP.NET MVC 3 Beta

First beta version of Microsoft ASP.NET MVC framework 3 is ready to be downloaded from here and announcement from Scott Guthrie's blog. Significant changes have already been made to this version. You can go through the release documentation to have detail information on the new changes that are available with this release.

One of the newest edition is the "NuPack Package Manager". If you are a ruby developer, then it will not be a real ground-breaking idea as you are already using RubyGem from the first day of your ruby development career. For .NET platform it's comparatively newer concept. There are few other open source project already available for the same purpose. But there is always a better expectation associated with something from Microsoft itself from developers point of view. To read more on NuPack refere to the this article from Scott Hanselman. With this release Microsoft is going to make integration of third party libraries with .NET easier.

The new view engine "Razor" is really cool!! Syntax is much cleaner now for view. Though the C# syntax was available from first preview version, now VB support is also in built. However, previously it was possible to use VB code but had to activate it manually. I am pretty excited with this view engine. But unfortunately the intellisense support is not yet ready for "Razor". Waiting for it...:) If you want to read more on this I will recommend Scott Guthrie's blog post on Razor.

There is an interesting new support for running code before views run for any particular view folder. If you want to set something default to all views, its extremely useful. The file that will be used for this purpose is named _viewstart.cshtml (C# code) or _viewstart.vbhtml (VB code). For example if you want to set the default layout for all views for a particular directory and its sub-directories you can set the layout code here. And it will run before running any view file within that directory.

There are bunch of other improvements including new helper methods, better dependency injection support, unobtrusive javascript support and many more.

1 comment:

  1. Microsoft is going towards right direction with ASP.NET MVC. Nice post...thanks