.NET, Core, Standard, Framework… Brain BSoD!
Introduction
In this article, we are going to see what Dot NET (.NET) is, and the commonly used terms that confuse a lot of developers, such as: “.NET Core”, “.NET Framework”, “.NET Standard”, “ASP.NET”, “UWP”, etc. causing our brain to throw BSoD exceptions. This is an important step for us to have the main understanding of .NET and to have a basic ground to understand each other.
What is .NET
.NET is a free development platform for building many different types of applications. With .NET, you can use multiple languages (such as C#, F#, or Visual Basic), editors, and libraries to build for web, mobile, desktop, games, and Internet of Things (IoT). The key features of the .NET platform are the following:
- Support multiple programming languages.
- Asynchronous and concurrent programming models.
- Language-Integrated Query (LINQ). LINQ (pronounced as “link”) provides language-level querying capabilities and a higher-order function API as a way to write expressive, declarative code.
- Native interoperability. As we saw in .NET Nakama (2020, August), every operating system has a built-in application programming interface (API) that provides system services. The .NET provides several ways to call those APIs.
Implementations of .NET
A .NET application is developed for and runs in one or more .NET implementations. Figure 1 presents the .NET platform’s architectural components. As we can see, .NET includes the following main implementations, the .NET Framework, .NET Core, and Xamarin/Mono.
.NET Standard
The .NET Standard is an API specification which is common to all .NET implementations (see Figure 1). It’s a specification of .NET APIs that make up a uniform set of contracts (think of it as a collection of interfaces) that you compile your code against. It solves the code sharing problem for .NET developers across all .NET platforms by bringing all the APIs across the environments that you need: desktop applications, mobile apps & games, and cloud services (Landwerth I., 2016) (.NET Standard, 2020).
The .NET Standard is also a target framework. This means that if your code targets a version of the .NET Standard, then it can run on any .NET implementation which supports that version of the .NET Standard. The .NET implementation support presents the list of the minimum platform versions that support each .NET Standard version.
.NET Framework
- The .NET Framework is the original .NET implementation that has existed since 2002.
- .NET Framework 4.5 and later implements the .NET Standard in general.
- Regarding .NET Standard 2.0 and .NET Framework, it is a bit confusing because .NET 4.6.1, 4.6.2, .NET 4.7 and 4.7.1 all have partial .NET Standard 2.0 support in the natively shipped runtimes, but they still are .NET Standard 2.0 compliant (Strahl R., 2019).
- .NET 4.7.2 is the first version of the full .NET Framework that is fully compliant with .NET Standard 2.0 without any additional dependencies (Strahl R., 2019).
- The .NET Framework is optimized for building Windows desktop applications.
.NET Core
- The .NET Core is a cross-platform implementation of .NET (that can run on Windows, macOS and Linux).
- It implements the .NET Standard, meaning that the code that targets the .NET Standard can run on .NET Core.
- Designed to handle server and cloud workloads at scale.
- Consistent across architectures (x64, x86, and ARM).
- Open-source (using MIT and Apache 2 licenses).
Xamarin/Mono
- Mono is a .NET implementation that is mainly used when a small runtime is required.
- It is the runtime that powers Xamarin applications on Android, Mac, iOS, tvOS and watchOS and is focused primarily on a small footprint.
- Mono also powers games built using the Unity engine.
- Xamarin extends the .NET developer platform with tools and libraries specifically for building apps for Android, iOS, tvOS, watchOS, macOS, and Windows.
Universal Windows Platform (UWP)
- Universal Windows Platform (UWP) is an implementation of .NET that is used for building modern, touch-enabled Windows applications and software for the IoT.
- It’s designed to unify the different types of devices that you may want to target, including PCs, tablets, phablets, phones, and even the Xbox.
Runtime and Managed code
An often-used term in .NET development is the “managed code”, which is simply the code whose execution is managed by a runtime. This runtime is called the Common Language Runtime (CLR), which runs the code and provides services that make the development process easier (such as automatic memory management, security boundaries, type safety etc.). To run existing .NET Framework and .NET Core applications, visit the .NET-Download website to download their runtimes (as shown in Figure 2).
Developer Pack & Software Development Kit (SDK)
The “developer pack” and the software development kit (SDK) are referring to “what” we have to use to create .NET applications.
- The developer pack is used by software developers to create applications that run on .NET Framework, typically using Visual Studio.
- The software development kit (SDK) includes everything you need to build and run .NET Core applications, using command-line tools and an editor of your choice (like Visual Studio).
Visit the .NET-Download website to download the Build packs for .NET Framework and .NET Core applications (as shown in Figure 3).
What is ASP.NET and ASP.NET Core?
ASP.NET
ASP.NET is an open-source web framework for building modern web apps and services with .NET. It extends the .NET platform with tools and libraries, such as:
- Base framework for processing web requests.
- Web-page templating syntax, known as Razor, for building dynamic web pages using C#.
- Libraries for common web patterns, such as Model View Controller (MVC).
- An authentication system that includes libraries, a database, and template pages for handling logins, including multi-factor authentication and external authentication with Google, Twitter, and more.
- Editor extensions to provide syntax highlighting, code completion, and other functionality specifically for developing web pages.
ASP.NET Core
- ASP.NET Core is the open-source and cross-platform version of ASP.NET.
- It is suggested to use ASP.NET Core for all new implementations.
- The majority of innovation occurs in ASP.NET Core, but other versions will continue to receive minor updates and bug-fixes.
- The Windows-only versions of ASP.NET that existed before ASP.NET Core, is typically just referred to as ASP.NET.
The Future is .NET 5.0
.NET 5 is the future for the .NET platform. The vision is to unify the .NET platforms (.NET Core, .NET framework and Xamarin) into one .NET and one toolchain, as shown in Figure 4. A single .NET runtime and framework will be produced that can be used everywhere having uniform runtime behaviours and developer experiences. Taking the best from each platform it aims to support all .NET application types, targeting Windows, Linux, macOS, iOS, Android, tvOS, watchOS and WebAssembly and more (Lander R., 2019).
New Supports in .NET 5.0
- Besides the single-unified .NET runtime and framework, .NET 5.0 will provide many more features, such as the ones listed below:
- Fast startup, low footprint, and lower memory usage.
- Improve performance throughout the product. Look at the closed GitHub PRs and the benchmarks from Toub S. (2020).
- Single file applications. A new single-file publish-type that executes your app out of a single binary.
- Java interoperability will be available on all platforms.
- Objective-C and Swift interoperability will be supported on multiple operating systems.
- …and many more, which are included in each preview release, published at the .NET Blog.
Stop Supporting at .NET 5.0
What is more important than the new cool features, is what .NET stops supporting (legacy features). To use .NET 5.0 a migration will be necessary for these cases. Table 1 shows the features that will not be part of .NET 5.0 and Microsoft’s migration recommendation (Hunter S., 2019).
Do not panic about the migration!
- Yes, .NET 5.0 will be the place where innovations occur, but other versions will continue to receive minor updates and bug-fixes.
- Do not forget that many products both within and outside Microsoft rely on .NET Framework, including the Windows Operating System (Microsoft will update it! 😉).
- .NET Framework 4.8 is the latest version of .NET Framework and will continue to be distributed with future releases of Windows (as stated at the .NET Framework Support Policy).
What you can do?
- Do not implement new projects using legacy features.
- You have to keep in mind that the migration will require work (depending on the project size) to move to newer technologies.
- Consider the migration of projects that you want features like those listed above (e.g. of .NET Core).
Stop Supporting | Recommended Migration |
---|---|
ASP.NET WebForms. For more information regarding the “death” of ASP.NET Web Forms, read MacDonald M. (2020) article. |
Blazor (Migration Instructions) |
Windows Communication Foundation (WCF) server | gRPC (Why it is recommended) |
Windows workflow (e.g. a Windows Service) | Core Workflow (Core WF) |
Table 1: Stopped supporting features in .NET 5.0 and their recommended migrations
.NET Schedule of Releases
The .NET 5 was scheduled to be shipped in November 2020, and then a major version of .NET will be shipped once a year, every November (see Figure 5) (Lander R., 2019). Due to COVID-19 pandemic, there will be delays, causing .NET 5 to still be shipped this November, but it won’t have all the unifying “one .NET to rule them all”. Thus, some features originally planned for .NET 5 are now slated for .NET 6 in November 2021 (Ramel D., 2020).
Summary
In this post, we learned what .NET is, several terms that may confuse us and what to expect from .NET in the future (no more brain BSoD 😛). If you are going to start a new project, pay attention to not use features that are characterized as legacy. I am very excited about the release of .NET 5.0 and the future of .NET in general. What a good time to be a .NET developer!
References
- .NET Nakama (2020, August). So… What is an API?
- .NET Standard (2020). The GitHub repository of .NET Standard. https://github.com/dotnet/standard
- Hunter S. (2019, June 7). Supporting the community with WF and WCF OSS projects. https://devblogs.microsoft.com/dotnet/supporting-the-community-with-wf-and-wcf-oss-projects/
- Lander R. (2019, May 6). Introducing .NET 5. https://devblogs.microsoft.com/dotnet/introducing-net-5/
- Landwerth I. (2016, September 26). Introducing .NET Standard. https://devblogs.microsoft.com/dotnet/introducing-net-standard/
- MacDonald M. (2020, February 7). Did ASP.NET Web Forms Need to Die?. https://medium.com/young-coder/did-asp-net-web-forms-need-to-die-4b7bce958aaa
- Ramel D. (2020, May 19). COVID-19 Delays Unifying .NET 5 Features. https://visualstudiomagazine.com/articles/2020/05/19/net-5-preview-4.aspx
- Strahl R. (2019, February 19). Using .NET Standard with Full Framework .NET. https://weblog.west-wind.com/posts/2019/Feb/19/Using-NET-Standard-with-Full-Framework-NET#net-standard-and-full-framework-net
- Toub S. (2020, July 13). Performance Improvements in .NET 5. https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/
If you liked this article (or not), do not hesitate to leave comments, questions, suggestions, complaints, or just say Hi in the section below. Don't be a stranger 😉!
Dont't forget to follow my feed and be a .NET Nakama. Have a nice day 😁.