Posted on 7/22/2021 3:01:21 AM by Admin

Introduction to .NET Core

If you landed here, this means either you are a web developer, want to be a web developer, or have some kind of interest in web development. Another possibility is that you have heard the name Asp.Net Core from someone, and wanted to know about it. Don't worry, you are at the right place.

Before diving into the exciting journey of web development with Asp.Net, I would like to make you familiar with some commonly used terms, which sometimes creates confusion so it is better to understand them as early as possible.

These confusing terms are as follow
    1. .NET
    2. .NET Core
    3. ASP.NET
    4. ASP.NET Core
    5. .NET Framework

Yes, you guessed them right, they all belong to the same ecosystem but are different from each other.

1. .NET : .NET is a developer platform. A developer platform refers to a software that provides tools, programming languages and libraries for building and running different types of applications.

What is .Net
What is .NET

A developer platform is a theoretical term, and there must exist some implementation of it. There are 4 implementations of .NET as shown below.

.NET Implementations
Different .NET implementation

1. .NET Core is a cross-platform .NET implementation for websites, servers, and console apps on Windows, Linux, and macOS.
2..NET Framework supports websites, services, desktop apps, and more on Windows.
3. Xamarin/Mono is a .NET implementation for running apps on all the major mobile operating systems.
4. UWP is used for building touch-enabled Windows applications and software for the Internet of Things (IoT)

An implementation of .NET includes
    1. One or more Runtime (example:- CLR, CoreCLR, CoreRT)
    2. A set of libraries (example:- BCL, CoreFX)
    3.Application Frameworks (example:- ASP.NET, WinForms, WPF etc)
    4. Development tools (example:- Visual Studio, Visual Studio Code, .NET CLI etc )

Architecture of .NET implementations
Architecture of .NET implementations

I think, now, it should be clear to you that among 5 confusing terms that I mentioned above, .NET is a developer platform, a theoretical term, .NET Core and .NET Framework are the real implementation of .NET, where .NET Framework is windows based while .NET 5(.NET Core or later versions) is Cross-Platform. This means, If you develop a Console or Desktop app using .NET Framework then it will run on Window OS only, whereas if you develop an App using .NET Core (.NET 5 or later versions) then it will run on Windows, Linux and Mac OS.

.NET 5

NET 5.0 is the next major release of .NET Core following 3.1. Microsoft named this .NET 5.0 instead of .NET Core 4.0 for two reasons:
  • They skipped version numbers 4.x to avoid confusion with .NET Framework 4.x.
  • They dropped "Core" from the name to emphasize that this is the main implementation of .NET going forward. .NET 5.0 supports more types of apps and more platforms than .NET Core or .NET Framework.

ASP.NET and ASP.NET Core

Now, Let's talk about ASP.NET and ASP.NET Core. ASP.NET and ASP.NET Core are application frameworks for Web development where ASP.NET targets .NET Framework and ASP.NET Core targets .NET 5 (.NET Core or later versions).

ASP.NET Core 5.0 is based on .NET 5.0 but retains the name "Core" to avoid confusing it with ASP.NET MVC 5. Likewise, Entity Framework Core 5.0 retains the name "Core" to avoid confusing it with Entity Framework 5 and 6.

As ASP.NET targets .NET Framework , a Web App developed using ASP.NET will only be hosted on IIS, whereas ASP.NET Core targets .NET 5 (.NET Core or later versions) so an App developed using ASP.NET Core can be hosted on IIS, Apache or Nginx.

Web development using ASP.NET
ASP.NET

If you have come this through, then you might be thinking that for developing different types of applications, you will have to select a specific .NET implementation for example for a windows based web or desktop App, .NET Framework , for Cross-Platform Web or Desktop App, .NET Core, for Mobile App, Mono etc, then don't worry, the Journey for a unified platform has already started with .NET 5 and as I believe with .NET 6 (LTS support), we will have a unified platform as shown in below image.

.NET 5
.NET 5

According to Microsoft, there will be just one .NET going forward, and we will be able to use it to target Windows, Linux, macOS, iOS, Android, tvOS, watchOS and WebAssembly etc, .NET 6 will include new .NET APIs, runtime capabilities and language features. Microsoft has taken best of .NET Core and MONO to create this single platform that will be used by all modern .NET code.

The project will improve .NET in the following ways:
  • There will be a single .NET runtime and framework that can be used everywhere.
  • .NET capabilities will be extended as it takes the best of .NET Core, .NET Framework, Xamarin and Mono.
  • We will be able to build projects on a single code-base.

Everything we love about .NET Core will continue to exist, means
  • It will also be open source and community-oriented on GitHub.
  • It will also be Cross-platform.
  • There will be support for leveraging platform-specific capabilities, such as Windows Forms and WPF on Windows and the native bindings to each native platform from Xamarin.
  • It will give High performance.
  • We will still be able to install different versions of runtime means we will be able to run different applications on a different version of .NET. This feature is called Side-by-side installation.
  • There will be small project files (SDK-style)

Here’s what will be new:
  • we will have more choice on runtime experiences .
  • Java interoperability will be available on all platforms.
  • Objective-C and Swift interoperability will be supported on multiple operating systems.
  • CoreFX will be extended to support static compilation of .NET (ahead-of-time – AOT).

References : Introducing .NET 5 by Richard