ASP.NET MVC or ASP.NET MVC2 RC2 & # 8594; RTM

I’m developing an application for the green field, development will begin tomorrow, when all user stories are completed, etc. I plan to use Windows Azure with ASP.NET MVC, I noticed that MVC 2 RC2 is going to be released, but there is much less literature on MVC 2 compared to MVC 1. Are there any significant differences between the two versions? I think it would be wise for me to start using MVC 2 now, and not later ...

What do you guys think?

+4
source share
3 answers

Go with MVC2. The planned release time is likely to be next month, given this now in RC. Despite the fact that one of the other posters speaks of minor changes, there are significant changes:

  • Heavily Added Extension Helpers
  • Strongly typed views
  • View Model Data Annotation Check
  • Many w / r performance improvements for caching "reflective" parts of code (expression trees can become expensive)

One of the best features you are developing for .NET 4 is the <%: syntax for automatically encoding HTML for strings in your views.

So, instead of using:

 <%= Html.Encode("<script>alert('you've been hacked');</script>") %> 

You can do it:

 <%: "<script>alert('you've been hacked');</script>" %> 

Think about it how to turn the equal sign on the side, for example, close the gate.

+7
source

If you are confident that your real-time date will be well below the planned release date for MVC2, I would go with MVC2.

+3
source

The differences between MVC1 and MVC2 are pretty minor and include features like websites and client-side jQuery validation against your object model. I highly recommend starting with MVC2, rather than trying to use its predecessor.

+1
source

Source: https://habr.com/ru/post/1302482/


All Articles