CTS – Your Technology Partner

What is new in ASP.NET MVC 5? (1 of 3)

Written by Ron Todosichuk on April 29, 2014

Introduction

Visual Studio 2013 shipped with ASP.NET MVC 5. This three-part article will talk about some key new features that are now available with ASP.NET MVC 5.

Discussed Features:

One ASP.NET

When you select a New Project from the VS 2013, you no longer see separate project templates for MVC Web, ASP.NET Web Form, or Web API applications. What you see instead is one template called ASP.NET Web Application.

clip_image002[1]

After you click the OK button, another dialog displays allowing you to select a starting web project temple. The options to include Web Forms, MVC, Web API, and add a unit test. Set the authentication method and configure you website as to run on Azure.

clip_image004[1]

This allows us to think about ASP.NET Web applications as one technology, one set of tools where we use “building block” to put the web application together. All ASP.NET Web applications share features like Scaffolding, Authentication, and Identity (OWIN). It does not matter if you use MVC, Web Forms, and\or Web API it is still an ASP.NET web application. Microsoft is serious about moving to this One ASP.NET concept, and this is the first step to getting there. Here a quote that Microsoft has on its ASP.NET website:

“Visual Studio 2013 brings us closer to One ASP.NET. There’s no MVC project type or Web Forms project any longer, there’s just ASP.NET. If you want to mix Web Forms and Web API, or MVC and SignalR, go ahead! You are encouraged and supported. New features and functionality are brought in with NuGet without breaking existing apps. New tools like Browser Link make building for the web more enjoyable than ever.”
http://www.asp.net/vnext

In addition, here is another quote from Scott Hanselman’s blog.

“The idea behind One ASP.NET is that I want folks to be able to make apps that have real-time components with SignalR, clean, simple APIs with Web API, all in one pages with KnockoutJS, pages with MVC, Web Forms or Web Pages, as well as existing ASP.NET systems like OData, ASMX, and more. I want open source projects like JSON.NET, KnockoutJS, SignalR, Backbone, MongoDB, Scaffolding, NHIbernate, Ninject (and the list goes on) to all play in the same ASP.NET LEGO sandbox.”
http://www.hanselman.com/blog/OneASPNETMakingJSONWebAPIsWithASPNETMVC4BetaAndASPNETWebAPI.aspx

Scott Hanselman used this infographic at the Build 2013 conference to illustrate the “blocks” that can be put together to build an ASP.NET application.

clip_image006[1]

http://channel9.msdn.com/Events/Build/2013/2-546

Bootstrap

Another feature that ASP.NET MVC 5 gives us is Bootstrap support out of the box. When you create a new MVC or Web Form project, the Bootstrap CSS files get added to the style folder and the layout page will be setup to use the Bootstrap classes. This may seem like a small change but it shows that Microsoft is thinking about modern web design and the current trends that are happening.

clip_image008[1]

Conclusion

With ASP.NET MVC 5 Microsoft seems to be moving in the right direction. They are thinking ASP.NET web applications as one thing and embracing and support third parity frameworks like Twitter Bootstrap.

In the next installments, I will continue this three part series about “What is New in ASP.NET MVC 5?”. Part 2 will covert Attribute Routing and ASP.NET Identity and Part 3 will cover Authentication Filters and Filter Overrides.

Comments

comments