What is the .NET Core?
The Definitive Guide to Understanding The Open Source Framework
By Cesar Contreras
.NET Core is the open source version of the Microsoft Framework .NET. It was released in 2002 to go hand in hand with Visual Studio.NET and it was the latest version of Microsoft Visual Studio IDE. This was an alternative to the .NET Framework and released with cross-platform applications functionality in order to give developers and business the flexibility to release products with a wider variety in the implementation department. The contributions for it to become open source came from the .NET Foundation with Microsoft back in 2014. This framework is used in many apps, tools, new platforms and hosting services. Multiple companies made contributions to the framework on GitHub and provided guidance and direction.
Whether you are working in C#, F#, or Visual Basic, your code will run natively on any compatible OS. The beauty in this is the different .NET implementations will be handling the heavy lifting for you. The framework power comes from its ability to adapt. It is designed to enable broad adaptability and compatibility to new platforms and workloads. It has several OS and CPU ports readily available.
The Core Framework can be defined by several key characteristics and they are:
- Cross Platform: Runs on Windows, macOS and Linux operating systems.
- Consistent across architectures: Runs your code with the same behavior on multiple architectures.
- Command line tools: Easy-to-use command-line tools that can be used for local development and continuous-integration scenarios.
- Flexible deployment: Can be used with Docker containers. It can be included in your app or installed side by side or machine wide.
- Compatible: .Net Framework, Xamarin, and Mono are some of the platforms, .NET Core is compatible with through .NET Standard.
- Open source: Apache 2 and MIT Licenses are what allows the .NET Core platform to be open source.
- Supported by Microsoft: Microsoft Decided to support the growth of .NET Core to give flexibility to its .NET Framework in an indirect way.
. NET Core has two major components. The first component includes a small runtime that is built from the code base as the .NET framework CLR. The second component is a series of base class libraries. These libraries are largely the same code as the .NET framework class libraries but have been factored into the shipment of a smaller set of libraries. These libraries are shipped as a system.
To define .NET Core, you can begin by looking at the architecture which is made of up four main components:
- .NET Core Runtime: This component provides a type system, an assembly loader, a garbage collector, native interop and many other basic services. It also includes the .NET Core framework libraries.
- ASP.NET Core Runtime: This provides a framework for building modern cloud-based internet connected applications such as web apps, IoT apps, and mobile backends. This component includes ASP.NET Core and .NET Core runtime and framework libraries.
- .NET Core SDK: This includes the .NET CLI Tools, ASP.NET Core runtime, and .NET Core runtime and framework.
- The dot net tool: This is used to launch .NET Core apps and CLI tools. It takes care of the runtime by hosting the runtime, providing and assembling loading policies, and launching apps and tools.
.NET Core exposes APIs for many scenarios. A few examples are:
- Primitive types: bool and int.
- Collections: System.Collections.Generic.List<T> and System.Collections.Generic.Dictionary<TKey,TValue>.
- Utility types: System.Net.Http.HttpClient, and System.IO.FileStream.
- Data types: System.Data.DataSet, and DbSet.
- High-performance types: System.Numerics.Vector and Pipelines.
.NET Core provides compatibility with .NET Framework and Mono APIs by implementing the .NET Standard specification.
There are many frameworks built on top of the .NET Core. The key frameworks you should know are:
- ASP .NET Core
- Windows 10 Universal Windows Platform (UWP)
The differences between the .NET Core and the .NET Framework are:
- App-models: The .NET Framework app-models are vast and potent sadly not all of them are supported by .NET Core. It doesn’t support ASP.NET Web Forms and ASP.NET MVC, but it supports ASP.NET Core MVC.
- APIs: .NET Core contains a large subset of .NET Framework Base Class Library. And Core implements the .NET Standard API specification.
- Subsystems: .NET Core implements a subset of the subsystems in the .NET Framework, with the goal of a simpler implementation and programming model.
- Platforms: The .NET Framework supports Windows and Windows Server while .NET Core also supports macOS and Linux.
- Open Source: .NET Core is open source, while the .NET Framework is not.
In summary, .NET Core exists to fill the gaps that the .NET framework left open. You need to remember that Core is not a replacement for the .NET Framework. However, with enough time and dedication, you can use it to power your apps, tools, new platforms or hosting services on Linux, macOS or Windows.
To many, .NET Core is the foundation for Microsoft’s future. By providing developers with an open source version of its existing .NET Framework, a new era of much better product experience was ushered in. Whether you like it or not, Microsoft made it so that web, cloud, mobile, gaming or any form of application you can imagine was at your grasp with this powerful variant of the flagship framework. Microsoft continues to impact the tech industry after decades of doing so and we are all witnesses.
Feel free to contact us with any questions or inquiries about .NET Core and the .NET Framework. Or if you want to send us an article. Email us at firstname.lastname@example.org.