- Posted by Shay Friedman on October 13, 2010
It’s already been 6 months since ASP.NET MVC 2 was released and version 3 is already taking shape. I, personally, am thrilled about that because this version seems to put ASP.NET MVC, in terms of maturity and functionality, on the first line along with other MVC frameworks out there like RoR.
I’ve put together 5 main reasons why I’m excited about this upcoming version. What about you?
1. The Razor View Engine
I said it before and I’ll say it again – the razor view engine is so cool!!! I really like the clean code I get when using it. In short, the razor view engine uses at signs (@) to indicate code blocks. For example, these are legit lines of code in razor:
@foreach (var item in Model) {
<b>@item.FullName</b>
}
2. New Helpers
Helpers is an area ASP.NET MVC has been lacking at, compared to other MVC frameworks. MVC 3 will have new helpers that tend to close that gap:
- Chart – helps creating charts. Very nice!
- WebGrid – renders a collection of objects as a grid including paging and sorting. Should output a plain HTML table. Hopefully that’s all there is to it…
- WebImage – helps in creating images. This also contains methods for basic image operations like rotating – cool!
- WebMail – used to send emails.
The next helpers have been referred to as “task-based helpers”. They should have been a part of the beta version but they’re not there… I hope they’ll make it to the release version because they are just pure awesomeness:
- Video – contains methods like Video.Flash, Video.Silverlight and Video.MediaPlayer which allow adding their corresponding HTML tags with ease.
- Twitter – contains basic twitter operations like rendering the twitter stream for a specified user or the results of a given search.
- ReCapcha – helps using the reCAPTCHA service.
- Gravatar – helps consuming a user’s avatar from the Gravatar service.
- Analytics – provides different methods like GetGoogleHtml, GetStatCounterHtml or GetYahooHtml that render the required javascript code for the different analytics services.
3. Support for Unobtrusive jQuery-Based Ajax
In ASP.NET MVC 3, Ajax.ActionLink, Ajax.RouteLink, Ajax.BeginForm and Ajax.BeginRouteForm will use JQuery to connect to the server. In addition, they will not use inline javascript, and instead they will call functions placed within javascript files.
Same thing applies to client-side validation.
4. Better Extensibility with new Dependency Injection Support
ASP.NET MVC 3 will contain numerous extensibility possibilities. Almost anything can be extended using DI, which opens so much opportunities. Just what extensibility means!
Read Brad Wilson’s post for a detailed guide to these new extensibility features.
5. NuPack Integration
NuPack is Microsoft’s new packaging system and it is fully integrated with ASP.NET MVC 3. Right click on the References folder in the Solution Explorer and choose “Add Package Reference…”:

Now the NuPack UI will open and you can choose from the various different libraries on the online gallery:

Pretty cool.
Well, these were my 5 reasons. So browse to http://go.microsoft.com/fwlink/?LinkID=191795, download the beta version and get excited too!
All the best,
Shay.
P.S. I’m not an ASP.NET MVP nor ASP Insider. Everything in this post was taken from various official blog posts and public web sites. Although the sources are as official as they can get (Scott Gu, Phill Haack…) this is only the beta version and as you know, in software – it ain’t over until the very last commit. Therefore, I recommend you check the release notes of every new version to see that no breaking changes were included.