Tutorial Introduction to ASP.NET Core

Alpesh Patel
.Net Programming
Published in
6 min readJun 3, 2021

We are going to give you a brief overview of ASP.NET Core. Nowadays, when it comes to software development world, everyone is looking for open-source, cross-platform development and which is free platform.

ASP.NET Core is a new version of ASP.NET by Microsoft. It is an open-source web framework which can be run on Windows, Mac, or Linux. These tutorials will help you understand ASP.NET Core web application step by step. We are going to discuss the following pointers in detail.

1. Overview of ASP.Net Core

2. History of ASP.NET Core

3. Why ASP.NET Core?

4. Where can we develop applications using .NET Core?

5. ASP.NET Core vs ASP.NET 4x

Prerequisites

Basic knowledge of C#, HTML, Visual Studio, and Object Oriented Programming is required.

ASP.NET Core Overview

ASP.NET Core is the new version of the ASP.NET web framework primarily focused to run on .NET Core stage.

ASP.NET Core is a free, open-source, and cross-platform framework for building cloud-based applications, like web apps, IoT apps, and mobile backends. It is designed to run on the cloud as well as on-premises.

Same as .NET Core, it absolutely was architected modular with minimum overhead, then other more advanced features are often added as NuGet packages as per application requirement. This leads to high performance, require less memory, less deployment size, and simple to take care of.

ASP .Net core Evolution

History of ASP.NET Core

.NET Core 1.0, announced on November 12, 2014, was released on June 27, 2016, along with Microsoft Visual Studio 2015 Update 3, which enables .NET Core development. .NET Core 1.0.4 and .NET Core 1.1.1 were released along with .NET Core Tools 1.0 and Visual Studio 2017 on March 7, 2017.

.NET Core 2.0 was released on August 14, 2017, along with Visual Studio 2017 15.3, ASP.NET Core 2.0, and Entity Framework Core 2.0. .NET Core 2.1 was released on May 30, 2018. NET Core 2.2 was released on December 4, 2018.

.NET Core 3 was announced on May 7, 2019, at Microsoft Build. Version 3.0.0 was released on September 23, 2019. With .NET Core 3, the framework supports development of desktop application software, artificial intelligence/machine learning and IoT apps.

The next release after .NET Core 3.1 will be .NET 5. The .NET Framework will not receive any further major versions, and .NET 5 will be the only .NET meant for new applications going forward — hence the removal of the “Core” branding and skipping of version 4 to avoid confusion with the .NET Framework 4.x. The first preview of .NET 5 was released on March 16, 2020.

.NET Core Version History

Why ASP.NET Core

There are a few limitations with the .NET Framework. For example, it just runs on the Windows platform. Likewise, you would like to use different .NET APIs for various Windows devices for example, Web applications, Windows Desktop, Windows Phone and Windows Store. Additionally to the present, the .NET Framework is a machine-wide framework. Any changes made to that affect all applications taking a dependency on it. Learn more about the motivation behind .NET Core.

Today, it’s normal to possess an application that runs across devices; a backend on the online server, admin front-end on web, windows desktop and mobile apps for consumers. So, there’s a requirement for one framework that works everywhere. So, considering this, Microsoft created .NET Core. The most objective of .NET Core is to make .NET Framework open-source, cross-platform compatible which will be utilized in a good sort of verticals, from the info center to touch-based devices.

There are various reasons why present day developers are using it and some of them are listed below:

Open Source:

The ASP.NET Core framework is Open Source which is that the main reason behind its popularity. .NET Core team is usually there to support your effort within the seamless development of the application. It receives bug fixing and improvement updates on a regular basis usually within a brief period of time. You don’t need to wait longer for updates. The pliability in framework code is keeping it at the highest of the developer’s choice. Depending upon the project’s requirements libraries and framework’s component are often added later.

Cross-Platform:

The earlier versions of ASP.NET Framework applications can only run on windows platforms whereas the .NET Core runs on Windows, macOS, and Linux operating systems. There are different runtime for each operating system that executes the code and generates the same output.

The ASP.NET Core Framework is designed from scratch to stay in mind to be Cross-Platform for both development and deployment. So, we don’t got to build different applications for various platforms using different frameworks. allow us to discuss what Cross-Platform is from the ASP.NET Core point of view by comparing it with the sooner versions of the ASP.NET Framework.

Supports Multiple Languages

You can use C#, F#, and Visual Basic programming languages to develop .NET Core applications. You can use your favorite IDE, including Visual Studio 2017/2019, Visual Studio Code, Sublime Text, Vim, etc.

Sophisticated Programming Features

The ASP.NET stack has undergone major overhaul, presenting to you ASP.NET Core framework that comes with a gamut of advanced features. These include:

· Automatic memory management

· Cross-platform architecture

· Package management

· Garbage collection

· Language independence

· Asynchronous programming

· Easy to quick and customize feature-rich enterprise-grade web applications

· Flawless development of MVC web applications and RESTful APIs

· Multiple language support

These features make it easier, faster and efficient for developers to build robust and modern web applications.

IoC Container

One of the foremost important used design patterns within the real-time application is that the Dependency Injection Design Pattern. It includes the built-in IoC (Inversion of Control) container for automatic dependency injection which makes it maintainable and testable.

Testing and Maintainability:

You can easily test and maintain the applications developed using the ASP.NET Core MVC framework. This is often possible because it allows you to separate different parts of your application into independent pieces and it also allows you to check them independently. The Testing frameworks like xUnit and MOQ are often easily integrated into ASP.NET Core MVC application for simulating any scenario.

Integration with Modern UI Frameworks:

It allows you to use and manage modern UI frameworks such as AngularJS, ReactJS, Umber, Bootstrap, etc.

Hosting

ASP .Net Core ability to host on the following and it is not dependent only on IIS as a standard .NET Framework:

  • Kestrel
  • IIS
  • HTTP.sys
  • Nginx
  • Apache
  • Docker

Code Sharing

It allows you to build a class library that can be used with other .NET frameworks such as .NET Framework 4.x or Mono. Thus a single code base can be shared across frameworks.

App Versioning

ASP.NET Core runs on .NET Core, which supports the simultaneous running of multiple versions of applications.

Smaller Deployment Footprint

ASP.NET Core application runs on .NET Core, which is smaller than the full .NET Framework. So, the application which uses only a part of .NET CoreFX will have a smaller deployment size. This reduces the deployment footprint.

Where can we develop applications using .NET Core?

As the dot net core is cross-platform so we will use several sorts of machines like Windows, Mac, and Linus to develop dot net applications.

What type of application we can develop with .Net Core?

  • Web: ASP.NET Core MVC, Web API, Razor Pages, and Microservices
  • Mobile
  • Console
  • Desktop Applications (Starting from 3.0)
  • IoT
  • ML
  • Gaming Applications
  • Cloud Applications

ASP.NET Core vs ASP.NET 4x

The following table compares ASP.NET Core to ASP.NET 4.x.

Thank you for reading, please let me know your questions, thoughts, or feedback in the comments section. I appreciate your feedback and encouragement.

Keep Learning…. !!!

--

--

Alpesh Patel
.Net Programming

Technology Specialist and Full-Stack Developer. Find me on linkedin for more details https://www.linkedin.com/in/alpesh-patel-8b930952