scroll

Microsoft .NET Core is a universal development platform

 

Microsoft .NET is a software technology offered by Microsoft as a platform for building both regular applications and web applications. Microsoft .NET Framework technology development began in 1999, with an idea to create compatibility of services written in different programming languages in a single runtime.

The present invention moved .NET platform to open-source enabling it to run on all operating systems, in the cloud, and in containers as .NET Core. This enabled us to write one high-quality application and transfer it painlessly between operating systems. Thousands and thousands of developers support this successful strategy.

History of .NET and its advantages

.NET is a cross-platform technology; at this time there is an implementation for the Microsoft Windows platform and an option for Linux OS in Mono project. There are many other options for developing .NET applications such as Visual Studio .NET (C++, C#, J#), SharpDevelop, Borland Developer Studio (Delphi, C#), etc. Eclipse has the application for developing .NET applications as well as a text editor and using the console compiler.

Like Java technology, .NET development environment creates a bytecode designed to run by a virtual machine. The input language for this machine in .NET is called Common Intermediate Language (CIL), also known as MSIL (Microsoft Intermediate Language), or simply IL. Using byte code allows you to get cross-platform at the level of the .NET compiled project. Prior to running a runtime assembly (CLR), the bytecode is converted by the built-in JIT compiler (just in time) into the machine codes of the target processor.

The development of the new technology was officially announced on January 13, 2000when Steve Ballmer stated that, despite the great capabilities of home computers, the corporation found it important to ensure that new generation services work on devices different from PCs. In the spring of 2014, Microsoft tried to revive developers' interest in the .NET platform by moving to the open process of developing some .NET components. To coordinate the development of .NET open components, in collaboration with Miguel de Icaza created by Xamarin, an independent non-profit organization, the .NET Foundation was set up to organize and foster collaboration with the community to develop the .NET platform.


Image source

Why .NET Core platform?

In November 2014, Microsoft announced the release of .Net server-side into open source and support for Linux and Mac OS X. Not all parts of the .Net platform are open, only three components: .NET Framework Libraries, .NET Core Framework Libraries, and RyuJit VM. Source code is licensed under MIT and documentation will be licensed under Creative Commons Attribution 4.0.

In May 2015, Microsoft announced the publication of the source code consisting of a set of libraries known as Windows Communication Foundation on GitHub. The code is open under the MIT license. It should be noted that the complete set of WCF libraries for the desktop is not open, but only a subset of it focused on interaction with services for mobile and server systems.

.NET Core is a free, cross-platform, managed code framework supported on Windows, Linux, and Mac OSX. Unlike the .NET Framework, .NET Core source code is fully open-source and accessible. It contains CoreCLR, a fully cross-platform implementation of CLR, the virtual machine that manages the execution of applications in the .NET environment.

The purpose of .NET Core platform is to help create universal Windows applications running on both Windows 10 and Windows 10 Mobile without changing the code. The .NET Core command-line interface provides an entry point for operating systems and provides services for developers such as compilation and management packages.

.NET Core supports four cross-platform scripts: ASP.NET Core Web Applications, Console Applications, Libraries, and UWP (Windows Universal Platform) Applications. It does not implement Windows Forms or WPF, which creates a standard GUI for Windows desktop computers. .NET Core is also modular, which means that instead of builds, developers work with NuGet packages. Unlike the .NET Framework, which is served by Windows Update, .NET Core depends on its package manager when receiving updates.

 
Image source

Modern .NET Core Platform

.NET Core consists of these main components:

  • The .NET Core runtime provides a type system, assembly loading functions, a garbage collector, native interaction functions, and other basic services. The .NET Core libraries provide primitive data types, application layout types, and basic utilities.
  • The ASP.NET Core runtime is a platform for creating modern Internet-connected cloud applications: web applications, IoT applications, the server-side of mobile solutions, and much more.
  • The .NET Core CLI and language compilers (Roslyn and F#) implement .NET Core development capabilities.

Implementations for Windows and Unix are almost similar in size. The implementation size for Windows is larger because the .NET Core libraries implement some features specific to Windows only, such as Microsoft.Win32.Registry, but do not yet implement many features specific to UNIX. You can also see that implementations for Linux and Mac OS are used in implementations for Unix, while files themselves are approximately the same size.

.NET Core Features

The main differences between the .NET Core and the .NET Framework are as follows:

  • Application Models. .NET Core does not support all .NET Framework application models. In particular, ASP.NET and ASP.NET MVC web forms are not supported, but ASP.NET Core MVC is. Starting with .NET Core 3.0, the .NET Core platform also supports WPF and Windows Forms on Windows only.
  • APIs of .NET Core include an extensive subset of the .NET Framework base class libraries with different code organization (other assembly names and key differences in the members provided for types). In some cases, these differences require changes to port the source code to .NET Core. See more information about the .NET portability analyzer. .NET Core implements the .NET Standard API specification.
  • Subsystems. The .NET Core platform implements a subset of the .NET Framework subsystems to simplify the implementation and programming model. For example, access control for code (CAS) is not supported, and reflection is supported.
  • Platforms. The .NET Framework supports both Windows and Windows Server, while the .NET Core also supports Mac OS and Linux.
  • Open-source. The .NET Core platform is open-source. In the case of the .NET Framework, open source only has a subset of read-only libraries.

Migration

All .NET Core applications, starting with .NET Core version 2.0, automatically roll back to the latest additional version installed. Starting with .NET Core 2.0, if the application was created using a version of .NET Core that is missing at run time, the application automatically runs in the newest installed additional version of .NET Core. In other words, if an application was created using .NET 2.0 Core and runs on a system where .NET Core 2.0 is missing but .NET Core 2.1 is present, this application runs on .NET Core 2.1.

Application Deployment

Applications created using .NET Core can be published in two different modes, and the mode affects how the user launches the application. When you publish a stand-alone application, an application includes the runtime and .NET Core libraries, as well as the application and its dependencies. Users can run it on a computer where .NET Core runtime is not installed.

When you publish an application as a runtime-dependent application, an application includes only the application itself and its dependencies, and its users need to separately install the .NET Core runtime.

Using the Docker Container

.NET Core applications can be easily run in a Docker container. Containers provide a way to isolate an application from the rest of the main system, share the kernel, and use resources that are transferred to that application. Also, .NET Core applications can be supported on cloud systems, in particular on Azure.

Unit testing

.NET Core makes it easy to create unit tests. .NET Core allows including unit tests to project on different programming languages. After setting up a test project, you can run unit tests on the command line or in Visual Studio.

Continuous integration

The .NET Core toolkit supports two continuous integration modes: interactive (developer enters commands on the command line) and automatic (the continuous integration server executes the build script). Commands, parameters, input, and output are the same. In this case, you only need to specify the method of obtaining funds and an application’s assembly system. MacOS users must use PKG installers. In case of Linux, you can choose a channel-based package manager, such as apt-get for Ubuntu or yum for CentOS. In addition, you can use the packages themselves (DEB or RPM). For Windows platforms, you can use the MSI installer.

Version control

The term .NET Core refers to the .NET Core runtime and .NET Core SDK that contains tools you need to develop applications. .NET Core SDKs are designed to work with any previous versions of .NET Core runtime.

Dependency management

In addition to transferring .NET Core projects from project.json file to CSPROJ file and to MSBuild platform, there was another significant change, which led to the unification of the project file and resources providing dependency tracking. For .NET Core projects, this is similar to the function previously performed by project.json file. There is no separate JSON or XML file for tracking NuGet dependencies.

Conclusion

It was announced that the next release of .NET Core will be the version of .NET 5, which will be called upon to unify the platform. This project is designed to improve .NET in a number of ways:

  • Creating a single runtime and .NET platform that can be used everywhere, with consistent development capabilities and runtime behavior.
  • Enhanced .NET features with the best features of .NET Core, .NET Framework, Xamarin, and Mono.
  • Creating a product based on a single code base that developers (Microsoft and community members) can improve and develop together.

For more information about the planned features of .NET 5, see Introducing .NET 5.

.NET Core is a great strategy for developing a platform and expanding capabilities on various operating systems is beneficial for everyone. This is an important step in maintaining a unified code infrastructure, and the proposed approach makes life easier for developers and system administrators. Support for cloud technologies for .NET Core is also a reliable incentive when choosing this platform for implementing projects. Svitla Systems experts own the entire stack in this direction and provide services for the development, testing, and maintenance of projects in the field of Microsoft technology in an effective and mutually beneficial manner.

by Svitla Team

Related articles

Kubernetes vs Docker
Kubernetes vs Docker
by Svitla Team
December 21, 2018
article
Custom Website Development
Custom Website Development
by Svitla Team
May 23, 2019
article

Let's discuss your project

We look forward to learning more and consulting you about your product idea or helping you find the right solution for an existing project.

Thank you! We will contact very shortly.

Your message is received. Svitla's sales manager of your region will contact you to discuss how we could be helpful.