Sunday, February 19, 2012

Some differences between ASP.Net MVC 3.0 and ASP.Net MVC 2.0

   ASP.Net MVC, first released around year 2009, has evolved to 3.0 (as I am writing this article, 4.0 is on the way). As the history proved, any Microsoft technologies, tools, which upgrade to 3.0, are worth to take a serious look. I would like to introduce some differences between MVC 3 and 2:

       1. ASP.Net view engine is changed to Razor. One of the direct effects is: the ASP.Net notation (<% %>) is changed to new notation @.

       2. Master page is gone. Well..., not really. It is re-invented as layout page, e.g. _Layout.cshtml.

       3. Induced a new feature ViewBag to pass parameter from controller to view.

       4. Better support to dependency injection.

       5. Better support to JQuery

       Above items are only from practice point of view. If you want to get the full list of new features of MVC 3.0, please read ASP.Net MVC 3.0 document.

No comments: