In the last tutorial, we introduced our ASP.NET CORE tutorial series. In this very tutorial, we will take a deep dive into the world of ASP.NET.
ASP.NET Core is a free, open-source, optimised and fast web framework which can run on the three most popular Windows, Linux, or Mac. It can be called the new version of ASP.NET. Though in reality, framework is a complete rewrite of the old ASP.NET. This was necessary in order to make it open source, modular and cross-platform. It was initially launched as ASP.NET 5 but was later renamed to ASP.NET Core.
ASP.NET Core is a modular framework distributed as NuGet packages. This allows us to include packages that are required in our application, just like in other frameworks like NodeJS
ASP.NET Core applications run on both, .NET Core and traditional .NET framework (.NET Framework 4.x).
ASP.NET Core is designed to be deployed on cloud as well as on-premises. Developers can now build cloud-based web applications, IoT (Internet of Thing) and mobile backend applications using ASP.NET Core framework which can run on Windows, Linux, and Mac operating systems.
ASP.NET Core is an open source framework supported by Microsoft and the community, so you can also contribute or download the source code from the respective repositories on Github.
ASP.NET Core Version History
|ASP.NET Core 3.0||September 2019|
|ASP.NET Core 2.0||August 2017|
|ASP.NET Core 1.1||November 2016|
|ASP.NET Core 1.0||June 2016|
Learn more about ASP.NET Core releases on GitHub.
Many people are confused between ASP.NET Core and .NET Core. Please note that ASP.NET Core and .NET Core are not the same. They are different, just like ASP.NET and .NET Framework are different.
.NET Core is a fast, lightweight, modular and open source framework for creating web applications and services that run on Windows, Linux and Mac. So, it is a platform on which ASP.NET Core application runs.
.NET Core is named “Core” because it includes core features of the .NET framework. The main objective of .NET Core is to make .NET framework open source, and cross-platform compatible so that it can be used in resource-constrained environments. It includes minimum features that are required to run a basic .NET Core app and other advanced features that can be included as a package from NuGet.
The following figure illustrates the components of .NET Core.
As you can see above, .NET Core includes .NET Compiler platform Roslyn, .NET Core runtime CoreCLR, .NET Core framework CoreFX and ASP.NET Core . ASP.NET Core is a part of .NET Core SDK so you don’t need to install ASP.NET Core separately. ASP.NET Core and .NET Core is a part of .NET Foundation.
.NET Core comes under MIT or Apache 2 licenses. Visit .NET Core repository on Github to contribute or download the source code.
Why ASP.NET Core?
- Supports Multiple Platforms: ASP.NET Core applications can run on Windows, Linux, and Mac. So you don’t need to build different apps for different platforms using different frameworks.
- Fast: ASP.NET Core no longer depends on System.Web.dll for browser-server communication. ASP.NET Core allows us to include packages which we need for our application. This reduces the request pipeline and improves the performance and scalability.
- IoC Container: It includes built-in IoC container for automatic dependency injection which makes it maintainable and testable.
- Integration with Modern UI Frameworks: It allows you to use and manage modern UI frameworks such as AngularJS, ReactJS, Umber, Bootstrap etc. using Bower (a package manager for the web).
- Hosting: ASP.NET Core web application can be hosted on multiple platforms with any web server such as IIS, Apache etc. It is not dependent only on IIS as a standard .NET Framework.
- Code Sharing: It allows you to build a class library which can be used with other .NET frameworks such as .NET Framework 4.x or Mono. Thus a single code based can be shared across frameworks.
- Side-by-Side App Versioning: ASP.NET Core runs on .NET Core which supports simultaneous running of multiple versions of applications.
- Smaller Deployment Footprint: ASP.NET Core application runs on .NET Core which is smaller than full .NET Framework. So, the application which uses only a part of .NET CoreFX will have smaller deployment size. This reduces the deployment foot print.
In the next chapter, we will install ASP.NET Core, and get started with exploring the features of this great framework