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.
- One ASP.NET (Part One)
- Bootstrap (Part One)
- Attribute Routing (Part Two)
- ASP.NET Identity (Part Two)
- Authentication Filters (Part Three)
- Filter Overrides (Part Three)
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.
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.
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.”
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.”
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.
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.
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.