17

With the release of ASP.NET MVC 3, I am wondering what are the major reasons (killer features) we should upgrade our app to MVC3.

Our app is currently in MVC2 using:

  • Ninject & Ninject.Web for IoC,
  • Linq to Sql
  • jQuery (no ASP.NET Ajax)
  • flot charts.
  • MVC Contrib
  • Custom REST (through dynamic WCF no XML config files)

We do not use ASP.NET charts or EF etc.

Is there any real compelling reason we should upgrade to ASP.NET MVC 3?

Tawani
  • 11,067
  • 20
  • 82
  • 106

5 Answers5

10

Here's a few additional features in ASP.NET MVC 3

  1. Razor view engine (Widely seen as a vast improvement on the previous ASPX view engine)
  2. Improved model validation with unobtrusive JavaScript and jQuery support. Including new remote validation amoungst others
  3. Partial page output caching.
  4. Dependency Injection Improvements, new IDependencyResolver`

More imporvements and details can be found at ASP.NET MVC site along with Scott Guthrie's anouncment

But only you can evaluate whether you should upgrade or not for your specific project.

It should be noted (as Robert Koritnik commented) that MVC 3 requires .NET 4.

David Glenn
  • 24,412
  • 19
  • 74
  • 94
  • What about .net framework? Is it possible to run MVC 3 on .net 3.5 SP1 or is it bound to .net 4 only? – Robert Koritnik Feb 13 '11 at 15:28
  • @Robert Unfortunately not, MVC 3 requires .NET 4 as it uses some of the updated features in .NET 4. – David Glenn Feb 14 '11 at 13:15
  • Exactly! I actually wanted you to put a disclaimer in your answer that even if you tick all the boxes and you're bound to .net 3.5, you'll have to stay on MVC2. – Robert Koritnik Feb 14 '11 at 13:39
  • can you explain exactly which thing is improved in **Improved model validation with unobtrusive JavaScript and jQuery support** ? –  May 27 '13 at 11:56
  • can you please explain exactly which thing is improved in model validation with [tag:unobtrusive] [tag:JavaScript] and [tag:jQuery] support ? – Imad Alazani Jun 22 '13 at 22:13
4

No more custom controller factory! This will apply to you. They wrote a new IDependencyResolver that you implement and DependencyResolver.SetResolver(...). Your IoC will go through out the application.

http://weblogs.asp.net/shijuvarghese/archive/2011/01/21/dependency-injection-in-asp-net-mvc-3-using-dependencyresolver-and-controlleractivator.aspx

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
3

The main two reasons we're about to upgrade are:

1) The ability to control HTML validation on a per textbox basis rather than on a whole page- this means we can allow the users to enter HTML into some textboxes on a page, rather than having to control it at the page level.

2) Remote validation - much less ajax for us to write!

Colin Desmond
  • 4,824
  • 4
  • 46
  • 67
3

1 Razor

2 Razor Intellisense within Visual Studio

3 Partial Page Output Caching

4 Validation and JavaScript/AJAX improvements

The Razor View Engine will make your view code nicer.

More details here

Andrew Orsich
  • 52,935
  • 16
  • 139
  • 134
2

Apart from all the answers there are few other reason for adopting MVC 3

  1. Unobtrusive Javascript
  2. Global Action Filters
  3. Custom Validation attributes and Self validation
Fraz Sundal
  • 10,288
  • 22
  • 81
  • 132