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.
随着ASP的发布。NET MVC3,我在想我们应该把我们的app升级到MVC3的主要原因是什么?
Our app is currently in MVC2 using:
我们的app目前在MVC2中使用:
- Ninject & Ninject.Web for IoC,
- Ninject & Ninject。网络对于国际奥委会,
- Linq to Sql
- Linq to Sql
- jQuery (no ASP.NET Ajax)
- jQuery(无ASP。净Ajax)
- flot charts.
- flot图表。
- MVC Contrib
- MVC Contrib
- Custom REST (through dynamic WCF no XML config files)
- 自定义REST(通过动态WCF没有XML配置文件)
We do not use ASP.NET charts or EF etc.
我们不使用ASP。NET海图或EF等。
Is there any real compelling reason we should upgrade to ASP.NET MVC 3?
有没有什么真正令人信服的理由,我们应该升级到ASP。净MVC 3 ?
5 个解决方案
#1
10
Here's a few additional features in ASP.NET MVC 3
下面是ASP中的一些附加特性。净MVC 3
- Razor view engine (Widely seen as a vast improvement on the previous ASPX view engine)
- 剃刀视图引擎(被广泛认为是对以前的ASPX视图引擎的巨大改进)
- Improved model validation with unobtrusive JavaScript and jQuery support. Including new remote validation amoungst others
- 使用不显眼的JavaScript和jQuery支持改进模型验证。包括新的远程验证。
- Partial page output caching.
- 部分页面输出缓存。
- Dependency Injection Improvements, new IDependencyResolver`
- 依赖注入改进,新的IDependencyResolver '
More imporvements and details can be found at ASP.NET MVC site along with Scott Guthrie's anouncment
更多的影响和细节可以在ASP中找到。NET MVC站点以及Scott Guthrie的报告
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.
应该注意的是(正如Robert Koritnik所说)MVC 3需要。net 4。
#2
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.
不再有自定义控制器工厂!这将适用于你。他们编写了一个新的IDependencyResolver,您可以实现并依赖它。你的国际奥委会将通过这个申请。
http://weblogs.asp.net/shijuvarghese/archive/2011/01/21/dependency-injection-in-asp-net-mvc-3-using-dependencyresolver-and-controlleractivator.aspx
#3
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.
1)在每个文本框的基础上控制HTML验证的能力,而不是整个页面——这意味着我们可以允许用户在页面上的文本框中输入HTML,而不是在页面级别上控制它。
2) Remote validation - much less ajax for us to write!
2)远程验证——更不用说ajax了!
#4
3
1 Razor
1剃须刀
2 Razor Intellisense within Visual Studio
2在Visual Studio内的剃刀智能感知
3 Partial Page Output Caching
3部分页面输出缓存
4 Validation and JavaScript/AJAX improvements
4验证和JavaScript/AJAX改进
The Razor View Engine will make your view code nicer.
Razor视图引擎会让你的视图代码更好。
More details here
更多细节在这里
#5
2
Apart from all the answers there are few other reason for adopting MVC 3
除了所有的答案之外,采用MVC 3还有其他的原因。
- Unobtrusive Javascript
- 低调的Javascript
- Global Action Filters
- 全球行动过滤器
- Custom Validation attributes and Self validation
- 自定义验证属性和自验证
#1
10
Here's a few additional features in ASP.NET MVC 3
下面是ASP中的一些附加特性。净MVC 3
- Razor view engine (Widely seen as a vast improvement on the previous ASPX view engine)
- 剃刀视图引擎(被广泛认为是对以前的ASPX视图引擎的巨大改进)
- Improved model validation with unobtrusive JavaScript and jQuery support. Including new remote validation amoungst others
- 使用不显眼的JavaScript和jQuery支持改进模型验证。包括新的远程验证。
- Partial page output caching.
- 部分页面输出缓存。
- Dependency Injection Improvements, new IDependencyResolver`
- 依赖注入改进,新的IDependencyResolver '
More imporvements and details can be found at ASP.NET MVC site along with Scott Guthrie's anouncment
更多的影响和细节可以在ASP中找到。NET MVC站点以及Scott Guthrie的报告
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.
应该注意的是(正如Robert Koritnik所说)MVC 3需要。net 4。
#2
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.
不再有自定义控制器工厂!这将适用于你。他们编写了一个新的IDependencyResolver,您可以实现并依赖它。你的国际奥委会将通过这个申请。
http://weblogs.asp.net/shijuvarghese/archive/2011/01/21/dependency-injection-in-asp-net-mvc-3-using-dependencyresolver-and-controlleractivator.aspx
#3
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.
1)在每个文本框的基础上控制HTML验证的能力,而不是整个页面——这意味着我们可以允许用户在页面上的文本框中输入HTML,而不是在页面级别上控制它。
2) Remote validation - much less ajax for us to write!
2)远程验证——更不用说ajax了!
#4
3
1 Razor
1剃须刀
2 Razor Intellisense within Visual Studio
2在Visual Studio内的剃刀智能感知
3 Partial Page Output Caching
3部分页面输出缓存
4 Validation and JavaScript/AJAX improvements
4验证和JavaScript/AJAX改进
The Razor View Engine will make your view code nicer.
Razor视图引擎会让你的视图代码更好。
More details here
更多细节在这里
#5
2
Apart from all the answers there are few other reason for adopting MVC 3
除了所有的答案之外,采用MVC 3还有其他的原因。
- Unobtrusive Javascript
- 低调的Javascript
- Global Action Filters
- 全球行动过滤器
- Custom Validation attributes and Self validation
- 自定义验证属性和自验证