Understanding the Microsoft .NET Ecosystem
Explore the four key components of this ecosystem: the .NET Framework, .NET Core, .NET 6, and .NET Standard and understand how each of these parts plays a crucial role in enabling developers to create high-performance, cross-platform applications across various real-world uses and across diverse industries.
.NET Framework – building windows applications
The .NET framework was released over two decades ago in 2002, providing a software development framework that runs only on Windows. It is the original .NET implementation and is used to build applications for Windows, along with services, websites, and API.
The .NET Framework includes a runtime, libraries, and provides a set of API to the developer for common programming needs. It is language agnostic, partly open-source, and its life cycle is coming to an end with Version 4.8 as the long-term support release. Going forward, Microsoft aims to push the use of .NET over the .NET Framework.
Over time, .NET Framework has become quite bloated due to extensive backwards compatibility with older compiled applications. From Microsoft’s perspective, .NET Framework is slowing down the platform’s adaptability moving forward. As such, Microsoft will not add new features and releases to the .NET Framework, instead focusing its efforts on the unified .NET platform.
How .NET Framework works
The .NET Framework works by compiling source code that’s written in one language (commonly C#) into Intermediate Language (IL). This code is then stored in assembly files containing information about security requirements, the code’s versions and types, and more. Assembly files are loaded to the Common Language Runtime (CLR) for validation. The stored IL code is then translated into machine code for execution. Multiple versions of the CLR can exist on one computer, making it easier to resolve version conflicts.
Architecture of the .NET Framework
The .NET Framework consists of three main components: Common Intermediate Language (CIL), Common Language Runtime (CLR), and Base Class Libraries. CIL is the compiled form of source code, executed by a CIL-compatible runtime like the CLR. The CLR serves as the engine that runs applications and offers various features such as exception handling and garbage collection. The base class libraries provide a range of APIs and types for common programming tasks like file operations, database connections, system communication, and GUI creation.
.NET Core – Microsoft’s cross-platform evolution
In 2016, Microsoft began the process of creating .NET Core – a free, open-source, cross-platform implementation for running Linux, MacOS, and Windows applications, and using hosting services such as Azure or AWS, allowing more flexibility when hosting applications on Azure or AWS.
.NET Core is independent from .NET Framework, despite being built to address many of its shortcomings, enabling developers to build truly cross-platform applications without being limited to Windows-only applications.
.NET Core’s modular architecture allows developers to leverage Nuget packages to enhance functionality and provide various features to .NET Core applications as needed. This Core implementation is used to create server applications on Windows, Mac, and Linux operating systems.
.NET 6 – A unified platform
After .NET Core 3.1, Microsoft introduced .NET 5, changing the “.NET Core” name to just “.NET”. All .NET implementations from v3.1 and down are called .NET Core, and all implementations from v5 and up are called .NET.Naming for Version 4 was kept for the .NET Framework, in which v4.8 is the long-term support release.
.NET 6 is technically the latest release of .NET Core, but under its new name. .NET 6 offers the latest APIs, language features, and brings improved performance for full stack development.
Going forward, Microsoft aims to push .NET 6 and beyond as their go-to platform for building cross-platform applications. .NET 7 releases in November of 2022 and will replace .NET 6. .NET Core has also reached end-of-life with Version 3.1.
.NET Standard – The Underlying Foundation
.NET Standard provides a set of common .NET APIs that are available on the different .NET implementations, forming an underlying base foundation that brings greater uniformity between .NET Core, the .NET Framework, Mono, Xamarin, Unity, etc. .NET 5 and beyond use other methods for establishing uniformity without needing to use .NET Standard.
It’s worth noting that .NET Standard is only for libraries, not for front-end user interfaces. Developers only have to write code once and it can be called by the different front-end user interfaces for each .NET implementation (e.g., .NET Framework or .NET Core).
“Developers only have to write code once and it can be called by the different front-end user interfaces for each .NET implementation.”
As a single abstraction layer, .NET Standard operates against mobile devices, Windows, Linux, Mac, IoT devices, etc. Note that not every user interface will work on every platform. For example, you still won’t be able to run Windows Forms on a Mac
In the long run, .NET Standard will eventually be phased out as it’s only an underlying foundation between older .NET implementations. As Microsoft keeps moving towards one unified platform, the need for uniformity between newer .NET implementations becomes less and less necessary, as was seen with the release of .NET 5 and beyond.
Commonly used .NET programming languages
The world of .NET applications encompasses several programming languages, each offering its unique strengths and capabilities. We explore the 3 most commonly used languages for developing .NET applications: C#, F#, and Visual Basic (VB). Each of these languages cater to different programming paradigms and are favored by developers for various reasons.
C# (C-sharp): C# stands out as a popular choice, renowned for its object-oriented nature, type safety, and modern programming features.
F# (F-sharp): F# brings a functional and concise approach to .NET development, making it ideal for tasks such as machine learning, data science, and manipulation.
Visual Basic (VB): VB provides a multi-paradigm, object-oriented, and event-driven programming experience, emphasizing ease of learning and rapid development of type-safe .NET applications.