Introduction To ASP.Net 5 in Visual Studio 2015

Introduction

ASP.NET 5 is the open-source framework for developing effective web applications. ASP.NET 5 Applications can run on the Windows, Mac and Linux. In the ASP.NET 5, it included the MVC 6 Framework that combines the features of the MVC and the other Application Programming Interface (API) in the single web programming framework.

With ASP.NET 5 we can change the architecture that creates the core web framework much leaner and the more modular. In ASP.NET 5 we can gain the following improvements.

  1. Built on the .NET Core, that supports correct side-by-side versioning.
  2. Built-in support for dependency injections.
  3. Cloud-ready environment-based configuration
  4. New tools that are supported in the modern Web development.
  5. Build and run cross-platform ASP.NET apps on Mac, Linux and Windows.
  6. Provides the ability to host on the IIS in your own process.

Now I will explain the new features of ASP.NET 5. the most important part of ASP.NET 5 is that we use ASP.NET vNext and ASP.NET 5 interchangeably, both implement the same framework.

Flexible with cross-platform and runtime engine

In ASP.NET 5 supports cross-platform applications. We can now run ASP.NET applications in Windows, Linux and other operating systems. In ASP.NET, vNext executes any of the following runtime engines.

  • Core CLR

    Core CLR is the completely modular runtime and it provides the runtimes for the projects we create in ASP.NET for applications. The Core CLR contains the same GC and JIT. The runtime is delivered on NuGet with the Microsoft.CoreCLR package.

  • Full .NET CLR

    The full .NET CLR is the Default runtime engine of Visual Studio. The full .NET CLR provides the entire API set and it's the good option for backward compatibility.

  • Cross-Platform CLR

    Cross-platform was released by Microsoft for Linux, Windows and the Mac OS X. It enables us to develop and execute .NET applications on the Mac and Linux devices. We can also use the Mono CLR for the cross-platform development.

MVC 6

Model View Controller (MVC) is a framework useful for developing web applications using an effective design. In MVC 6 , Microsoft removed the dependency on System.Web.Dll because it's very costly and contains 30k memory per request and response but now in MVC 6 it contains only 2k of memory per request and response so it requires very less memory consumption.

Open Source

.NET Core is now open-source. It is available in GitHub. GitHub is the development tool, as much a part of coding as languages and compilers.

Host anywhere

ASP.NET 5 enables us to host applications on IIS or self-host applications in our own process. Its new capability provides very much freedom when we want to host an application in various hosting platforms. Now, we simply deploy the project to the host, the hosting preference no longer dictates which building framework is best for running the application.

ASP.NET vNext Templates

For building ASP.NET applications, new ASP.NET templates have been included with Visual Studio 2015. When we open the "New ASP.NET Project" dialog for C# we will get the "ASP.NET 5 Empty" and "ASP.NET 5 Starter Web" templates added to Visual Studio 2015. To develop ASP.NET vNext applications, we should have Visual Studio 2015 preview.

Faster development and cloud ready

ASP.NET 5 provides another effective feature that helps to make development faster. This feature is a much-awaited feature and personally I am very happy about this feature. We can now make changes in the source code files and refresh the Web Browser, the compilation will be done automatically.

Unified core framework

One of the most important features is the inclusion of a unified core framework for development of ASP.NET MVC, ASP.NET applications and ASP.NET Web API. Now we have only one unified core for ASP.NET Web Pages. So we need only one type of controller to handle requests, it is common to both ASP.NET MVC and ASP.NET applications. Now we have only one routing framework, one-filter pipeline and a single model binding framework.

Improve HTTP performance

ASP.NET 5 included a new HTTP request pipeline that is fast and lean. HTTP is modular so we can add only the required components that are needed. By reducing the overhead in the HTTP, your application gets better throughout.

Make it open source and transparent

The code for ASP.NET 5 is available through GitHub. Not only is the code available, but we use the GitHub repositories in the development. We can see exactly that modifications were made and when they were made. We can download the code and submit changes.

Make it Cloud Ready

When we create an ASP.NET 5 project, that project is ready for easy deployment to the cloud. Visual Studio 2015 provides the new environment configuration system that replaces the Web.config file. This system enables us to request named values from a variety of sources, such as XML, JSON and environment variables. We specify values for each environment and after deployment the application simply reads and corrects the values.

Simplify Dependency Management

ASP.NET 5 introduces a new way to manage dependencies in projects. We no longer need to add an assembly reference to our project. Instead we manage the dependencies by referencing NuGet packages. We can easily add NuGet packages using the NuGet Package Manager or we can edit the JSON file that lists the NuGet packages and version used in projects.

This article described the new features of ASP.NET 5 in the Visual Studio 2015. I hope this article is helpful for readers. Thanks for reading the article.