Microsoft's ASP.Net is a popular Web application development framework that has been around for more than a decade now. ASP.Net was first released in the year 2002 as part of Microsoft .NET Framework 1.0 along with Visual Studio 2002. Since then it has matured a lot and has been the technology of choice to the application developers worldwide for building robust, scalable Web applications.
ASP.Net 5 is an open source, cross-platform and lean framework that promotes faster development and enables you to build applications for the Web and cloud. ASP.Net 5 has been re-designed altogether to provide you a web application development platform with better performance, full side-by-side support, and cross platform support for Linux and Mac. ASP.Net 5 is available on GitHub.
Note that ASP.Net vNext includes an early release of Entity Framework 7 as well -- the Entity Framework runtime is installed in new ASP.Net vNext projects by default. I will soon write a post on what’s new in Entity Framework 7.
I'll now present the striking new features in ASP.Net vNext in the sections that follow. Please note that I would use ASP.Net vNext and ASP.Net 5 interchangeably; both imply the same framework.
Support for cross – platform and flexible runtime engine
Cross-platform support is a great new feature in ASP.Net 5. You can now run your ASP.Net applications on Windows, Mac, and Linux operating systems. With ASP.Net vNext can be executed on any of the following runtime engines.
- Full .Net CLR: this is the default runtime engine
- Core CLR: this is a lean, cloud optimized and completely modular runtime
- Cross Platform CLR: this would enable cross-platform support. When this runtime would be made available, it would provide support for developing applications for Linux and Mac OS X.
When you create projects in Visual Studio 2015, it would use the full .Net CLR by default. You can change this setting through the configuration properties of your project.
Unified core framework
One of the most fascinating of the new features is the inclusion of a unified core framework for development of ASP.Net MVC, ASP.Net Web API, and ASP.Net applications. You now have one unified core for ASP.Net MVC, ASP.Net Web API, and ASP.Net Web Pages. So, there's now only one type of a controller to handle requests: it's common to your ASP.Net MVC, ASP.Net Web API. and ASP.Net applications. In essence, you now have a single routing framework, a single model binding framework, and a one-filter pipeline.
Faster development and cloud ready
ASP.Net 5 provides another excellent new feature that promotes faster development. This was a much-awaited feature, and I was thrilled to see it incorporated in ASP.Net vNext. You can now save changes to your source code files and refresh your Web browser -- compilation would happen automatically. ASP.Net 5 is ready for the cloud: diagnostics, session state, cache and configuration would now work seamlessly both on premise as well as in the cloud platform.
ASP.Net vNext is now host agnostic. It includes a new modular HTTP request pipeline that is optimized and can be hosted on any of the following platforms.
- Internet Information Services (IIS)
- Open Web Interface for .Net (OWIN) based server
- Kestrel server
- Self-hosted in a custom process
ASP.Net vNext applications don't talk directly to the Web server. This host agnosticism is facilitated through "feature interfaces". This implies that there are certain Web servers whose would implement some features while the others wouldn't do so. This host abstraction layer in ASP.Net vNext is provided by the IApplicationBuilder interface. Host agnosticism enables ASP.Net vNext applications to switch between hosts seamlessly.
ASP.Net vNext Templates
To build ASP.Net vNext applications, new templates for ASP.Net 5 have been added in Visual Studio 2015. When you open the "New ASP.Net Project" dialog for C# you would observe the "ASP.Net 5 Empty" and "ASP.Net 5 Starter Web" templates added. Also, in the "New Project" dialog under "Visual C#"/Web you would see inclusion of the "ASP.Net 5 Class Library" and "ASP.Net 5 Console Application" templates.
To know more on the new features and enhancements in ASP.Net vNext, you can refer to this post.
Visual Studio 2015 CTP 5 comes up with the ASP.Net 5 framework.
To develop ASP.Net vNext applications, you should have Visual Studio 2015 preview or later installed in your system. To get started working with ASP.Net 5 you should download a copy of Visual Studio 2015 CTP 5.
This article is published as part of the IDG Contributor Network. Want to Join?