Get in touch
Thank you
We will get back to you as soon as possible
.pdf, .docx, .odt, .rtf, .txt, .pptx (max size 5 MB)

29.8.2023

20 min read

What is .NET? Microsoft .NET family explained

Microsoft has an impressive set of tools for building applications, from simple command-line interfaces to resilient web services and cross-platform desktop programs. However, it comes at a cost. In this case, the cost may be low for experienced developers but higher for beginners. And right now, I’m not talking about a compromise between high- and low-level languages.

A simple example. There is JavaScript language, and there are a bunch of frameworks for building both frontend and backend applications with JS. There is Python with different frameworks and libraries for building applications or using for machine learning tasks. And there is .NET. What is .NET? It’s not a language. How would you do .NET, then? Again, these questions probably won’t be a problem for people with some experience, but without a doubt, some elements may cause misunderstandings. Answering the previous question, .NET is a platform that provides a way to work with different frameworks for creating all kinds of applications and writing in different languages like C#, F#, Visual Basic, and others.

Another issue is naming. And this may impact experienced .NET developers also. ASP.NET is one of the most prominent components of the .NET platform. It’s a web framework that has existed since 2002 and has lived through multiple stages. That’s why when googling for some ASP.NET related, sometimes, it’s almost required to specify precisely what you’re interested in. It also may not be easy because ASP.NET was followed by ASP.NET Core (Core, to avoid ambiguity), which Microsoft prefers to call just ASP.NET now. Do you see? ASP.NET → ASP.NET Core → ASP.NET.

With all the new products, it seems that Microsoft handles all of this quite nicely, but that legacy makeweight still exists and will exist for many years. Not that it will prevent developers from using .NET, but the confusion is still there. In this article, I’d like to cover the most important aspects of .NET development – what .NET is, what elements it includes, what is already outdated, and how different parts interact.

What is .NET in a nutshell?

.NET is neither a language nor a framework in the usual sense. It’s a much broader so-called platform that provides a way to work with different languages and frameworks. And it’s pretty flexible because one can create web, desktop, and mobile applications, machine learning models, etc., staying within the scope of the chosen language and tools. .NET includes:

  • A runtime, in other words, an execution engine, which lets applications run on supported machines
  • Application platforms (or frameworks) like ASP.NET, Windows Forms, etc.
  • Development tools
  • And many more

And if this description didn’t clarify things, that’s okay. (If not, try to be more sincere with yourself. Honestly, how is it possible to understand all of that from a single paragraph?)

.NET Framework, .NET Core, .NET

So, .NET is a platform for everything .NET related. I think of it as a sandbox where you can play with a strict set of toys.

Everything we will discuss lives in this platform's scope. .NET is old (or rather experienced), so it has already lived through three phases.

.NET Framework

Initially, there was .NET Framework, which targeted only Windows computers. Unfortunately for developers, it’s still used quite a lot. The latest version, .NET Framework, 4.8.1, was released in August 2022.

.NET Core

The next iteration was called .NET Core, and with this naming, the platform lived up to version 3.1. Initially, Microsoft was building this platform under the .NET Framework 5 name, but midway decided to create it almost from scratch and thus also picked a different name not to confuse users. It differs a lot from the previous implementation. Still, the main emphasis was cross-platform support (although it was far from perfect until at least .NET Core 2.0), modularity, and open-source. This way, it also addressed the most critical issues of the previous version.

.NET (.NET Core 5+)

At some point, Microsoft skipped number 4 and moved to 5. They also dropped the Core part of the name, leaving developers with .NET 5. Since then, this platform has been called .NET. The current LTS version is .NET 6, and the latest is .NET 7.What is .NET? Microsoft's Ubiquitous Development Platform Explained-1

Summary

  • .NET Framework (up to 4.8): Windows-targeted implementation of the .NET platform with multiple frameworks for building different types of applications. Usually, it’s always referenced with the “Framework” part to differentiate between the old and the new one.
  • .NET Core (from 1.0 to 3.1): cross-platform implementation of .NET platform.
  • .NET (since 5): the continuation of the .NET Core line that aims towards the same goals, the main being cross-platform support. Sometimes, it’s also referenced with the “Core” part to again differentiate between the old and the new one (handy while using Stack Overflow, for example).

There is also .NET Standard, but it’s not a version of a platform, but rather a standard, which you could have guessed by its name, and we’ll discuss it at the end of this article.

Languages in .NET

Another quite exciting topic. When developers don’t identify themselves as general frontend, backend (or any other), they usually refer to a specific language they mostly use: JS developer, Python developer, etc. With .NET, as you can already see, it doesn’t work that way (although usually, you would see .NET developers and not C# developers, which is amusing, in my opinion). Again, .NET is not a language but a platform that supports multiple languages. There are three main ones: C#, F#, and VB.NET (Visual Basic). And it’s even possible to use others. For this, one should make it compatible with the platform. Examples are IronPython and IronRuby. Still, these are mostly experiments.

С#

It is the most popular language in the .NET platform. It’s a general-purpose, high-level, strongly-typed language that supports imperative, declarative, and functional paradigms.

There are a lot of great materials about C#, and even the Wikipedia article is quite comprehensive, so I won’t spend much time on it here.

C# was influenced by many other languages, including C++ and Java. It grows rapidly and acquires new features and more syntax sugar to make developers’ lives easier. One of the most prominent features of C# is LINQ, a language-integrated query, a set of technologies built directly into the language. It helps to write SQL-like queries using all language features (including type-checking, IntelliSense support, etc.). This way, it’s possible to do common filtering, querying, and grouping on different levels and sets of data. It resembles writing SQL code using C# constructs, which you start looking for when switching to other languages from C#.

Although F# is a full-fledged functional programming language in the .NET world, C# also has features inspired by this paradigm: functions as first-class citizens, closures, tuples, pattern matching, etc.

F#

F# is another language in the .NET world that accentuates the functional programming paradigm, although technically, it’s also a multi-paradigm language.

As with other languages in .NET, developers using F# can access the whole toolset of what is available in .NET. Therefore, F# is used for web development, data science, etc. Among its unique features are those of functional languages: type inference, pattern matching, units of measure, etc.

VB.NET

Finally, Visual Basic is another popular language in the .NET platform, which is also object-oriented and multi-paradigm. This language won’t grow and acquire new functions based on Microsoft's approach. Instead, the company focuses on preserving it as a straightforward, approachable language with a stable design.

Frameworks in .NET

As with most modern technologies, language is not enough to create applications. Technically, no one stops you from doing everything from scratch, but probably, you’ll spend years instead of months or weeks. Instead, we use frameworks.

Let’s look into the most popular ones in the .NET world.

ASP.NET

ASP.NET is a framework for building web applications that include multiple so-called programming models (frameworks inside the framework, in other words). We’ll look into them next. Since ASP.NET runs on top of CLR (we will discuss it later, but treat it as a part of this sandbox responsible for powering your toys), it’s possible to use any .NET language to utilize its features.

ASP.NET was a continuation of ASP, the first Microsoft technology for building servers that used the VBScript language. Since the modern version of the .NET’s web framework is also called ASP.NET, sometimes the old one is referred to as ASP.NET 4.x.

Now, let’s take a deep dive into the programming models or frameworks inside ASP.NET for building specific types of applications.

ASP.NET MVC

The first programming model relies on one of the longest-living patterns in web development called model-view-controller. In this framework, we have:

  • A model that represents the state of a specific part of the application. Usually, it’s a simple class with properties (state) for this page.
  • A controller is responsible for taking input and returning an updated representation (not very different from modern REST-style controllers, but it returns views and pages instead of raw data).
  • A view. It is basically what an end user sees when interacting with an application (it’s a combination of representation and pure logic. While C# is used for the latter, there are many choices for the former).

Since everything the user sees in the browser is HTML, the language should be able to produce it. In ASP.NET MVC, there are multiple view engines available which look like a mix between the server language and HTML (.cshtml, .vbhtml, .aspx).

ASP.NET WebForms

It’s an old technology that was the main one in .NET Framework before the introduction of MVC. It was already included in the first version of .NET Framework, and it’s not supported by .NET Core at all.

One of the main differences between WebForms and MVC is that in WebForms, view and logic are tightly coupled, whereas in MVC, they are entirely separated.

It is a somewhat outdated technology, and you should look into it only if you have to maintain it while starting a new project.

One of the ideas behind this framework was to let developers familiar with Windows Forms (another framework for Windows-only desktop application development) start creating web applications.

ASP.NET Web API

WebForms and MVC share one perceptible feature: business logic and visual representation are coupled. Yes, to a different extent, but still, it’s the same codebase.

However, ASP.NET lets developers create web applications with a REST API interface that could be consumed, for example, by single-page applications. It’s the same feature currently available in modern .NET Core. The framework's technology and API have obviously changed, but the principle is the same. The entry point is a set of controllers with endpoints. The framework itself handles such things as model binding, route matching, etc.

ASP.NET Core

As you already know, after ceasing the active development of .NET Framework, Microsoft switched to .NET Core. Since ASP.NET was developing hand-in-hand with the platform, its last major version was also 4.8.

Microsoft worked on ASP.NET 5 alongside a new .NET version for some time. But later, ASP.NET 5 branched into a separate project called ASP.NET Core, with versioning starting at 1 to match .NET Core versions. Until ASP.NET Core 3, it worked both on .NET Core and .NET Framework, but after that, Microsoft decided to drop support for the old platform.

At the same time, ASP.NET Core is fully cross-platform. It was not perfect right away, but after 2.0, especially starting from 3.1, it started to shine and work flawlessly on Windows, Linux, and macOS.

Those different programming models discussed previously for ASP.NET (namely MVC, WebForms, etc.) were merged into a single framework. In ASP.NET Core, MVC and Web API are considered a single programming model.

ASP.NET Core brought some updated components to follow the new approach. Among them:

  • Entity Framework Core - full-fledged ORM
  • Identity Core - authentication system
  • Razor Core - syntax and view engine for creating web pages using C# (works both as a part of MVC and in a new Razor Pages model)
  • Kestrel - lightweight server

The last thing I’d like to mention here is that Microsoft tends to call modern ASP.NET just that, without the “Core” part, which may be confusing, mainly for developers looking for documentation or answers on Stack Overflow.

Hopefully, these explanations resolve questions and discussions like “ASP.NET MVC vs. ASP.NET Core” that may arise among new developers unfamiliar with the platform and trying to find the starting point of getting into it. Diving into the modern .NET world of web development, it’s almost impossible to omit using MVC, though sometimes developers may not be aware they are utilizing some of its elements.

Razor

First, Razor appeared in ASP.NET as a part of AspNetWebStack. However, later it was released as a part of ASP.NET Core. It’s a view engine and syntax for creating web pages that resemble modern template engines for creating SPAs like Angular, Svelte, React, etc.

It includes:

  • HTML which is rendered on a server the same way it would’ve been rendered in a browser
  • Razor syntax, which lets developers inject C# code that is evaluated and also transformed into HTML

Razor can be used as a part of the Razor Pages model, with MVC or in Blazor (which will be discussed later).

Blazor

Until now, we discussed elements of the .NET world that existed both in the times of .NET Framework and migrated to the current times. However, Microsoft presents new technologies to adapt to modern trends and approaches for building applications.

Blazor is another framework for building web applications in the modern ASP.NET [Core] world. One of its main features is the ability to create fully-featured and interactive UIs without using JavaScript. It relies on WebAssembly (which, if you know nothing about it, deserves a separate explanation – in short, it’s a way of running programs written in different languages (like C# and others) in a browser).

At the same time, Blazor lets developers reuse existing JavaScript libraries, which provides another layer of flexibility: on the one hand, they no longer need to rely on JS to build interactive client applications. And on the other hand, they can still utilize JS and not have to reinvent the wheel.

At the same time, the approach for working with Blazor can be compared to that used by modern component frameworks like React, Svelte, etc. For this, Razor syntax is used. The framework is similar to meta-frameworks like Next.js, Nuxt.js, SvelteKit, etc.

Blazor is a relatively new technology that relies on another relatively new tech (WebAssembly). Thus it’s not very widespread yet. However, Microsoft has a showcase of real apps built using Blazor, and the community is also growing, which should improve developer adoption.

Windows Forms, WPF, UWP

ASP.NET [Core] is one of the most popular frameworks for building web applications in the world. However, .NET world offers more than that. Multiple frameworks for building desktop applications were developed together with the platform itself. The oldest ones are Windows-only in the same way as ASP.NET was, but modern tools provide multiplatform support.

Windows Forms

Windows Forms is an outdated technology from the .NET Framework world that was used for building desktop applications. It’s important to note that it’s not a full-fledged solution for creating applications but a layer responsible for creating UIs. It relies on event-driven architecture (where programs mostly wait for interaction from a user). It provides access to some Windows APIs, and the actual process of building interfaces is done through visual constructors.

WebForms, as we discussed previously, appeared after Windows Forms and was created to allow the building of web applications that relied heavily on the developer experience of its predecessor. This was advertised as one of the main features of that framework.

While you’d probably go towards more modern solutions as a developer, there are still examples of Windows Forms being used for apps requiring high stability.

WPF

The next in the row of desktop frameworks is WPF. It’s also mainly designed for creating the UI part of the application. WPF application code is usually split into two parts: declarative XAML, which describes the visual side, and common imperative C# code for defining event handlers and business logic to execute. Besides working with plain data, it provides ways to work with graphics, multimedia, and 3D, allowing for the creation of more impressive applications. WPF highly advocates for the MVVM architectural pattern for separating responsibilities. Here are the main advantages of WPF over Windows Forms:

  • Application logic and UI representation are uncoupled in WPF. It allows splitting the work, improves testing capabilities, and makes the code more maintainable.
  • WPF provides more customization options for designing its UI elements.
  • It offers both rich data binding capabilities and support of the MVVM pattern.
  • WPF uses DirectX, which allows the creation more impressive apps.

Windows Forms is probably a bit easier to learn and adapt, whereas WPF has a steeper learning curve. However, it’s justified by the number of capabilities available in WPF.

UWP

The Universal Windows Platform is the next step for Microsoft, making it possible to create apps for different Windows devices like desktops, Xbox, HoloLens, etc. At the same time, the framework does all the hard cross-device work, and developers still maintain a single codebase.

UWP also strongly focused on delivering its apps via the Microsoft Store instead of just self-deployment and publication.

It’s safe to say that UWP became more constrained in terms of UI options available, trying to force developers to make apps look more or less the same.

Although UWP was a more modern solution, it still had compromises compared to previous frameworks, especially regarding flexibility, providing fewer options for customizing UI, publishing apps, etc.

Mono and Xamarin

Suppose .NET is a sandbox in which one can play with a set of tools. In that case, Mono is just another sandbox built by the existing guidelines that can be put anywhere (mainly Linux, contrary to the Windows-only scenario, which was the case in times of .NET Frameworks) and used to play the same existing toys. Using the same analogy, Xamarin is an additional set of toys you can freely use in this new sandbox version to do things previously unavailable, mainly because of where the original sandbox was located.

But let’s dive deeper and try to find more appropriate definitions.

First of all, Xamarin is a company responsible for the creation of multiple .NET-related technologies like:

  • Mono (Xamarin bought Mono at a certain point in its development)
  • Xamarin.Android (formerly Mono for Android)
  • Xamarion.iOS (formerly MonoTouch)
  • Xamarin.Forms

But also, Xamarin (along with different suffixes) is a set of tools for building mobile applications on the .NET platform. Currently, it’s fully integrated into .NET itself since Microsoft bought Xamarin in 2016, but initially, it was created to fulfill two goals:

  1. Provide a cross-platform implementation of CLI to allow developers to create applications targeting different platforms.
  2. Make cross-platform development easier by allowing developers to reuse significant parts of code.

All the platform-specific Xamarin tools were impossible without Mono, which also had an extensive lifespan and was created with a sole purpose: to be a cross-platform implementation of .NET runtime.

As mentioned, Microsoft acquired Xamarin in 2016, and since then, the platform has been integrated into .NET, which has already become cross-platform.

Since Mono is a cross-platform implementation of .NET Framework specifically, and since its creation, we’ve already got a fully cross-platform .NET Core led by Microsoft, it can probably be used for legacy applications. As for Xamarin, Microsoft recently announced that it’ll be integrated into .NET MAUI – a new framework for creating cross-platform applications for Windows, macOS, iOS, and Android.

.NET MAUI

.NET Multi-platform App UI is the latest framework in Microsoft’s stack for building cross-platform applications that can run on Android, iOS, macOS, and Windows. It’s an evolution of Xamarin.Forms.

The main idea behind .NET MAUI is to have a single codebase for all the targeted platforms. But there is also a way to write code for each platform. .NET MAUI utilizes C# and XAML.

Here’s a nice abstraction of how all of this is possible:

What is .NET? Microsoft's Ubiquitous Development Platform Explained-2

Source: What is .NET MAUI? - .NET MAUI | Microsoft Learn

It’s a pretty new platform, but it’s already clear that Microsoft will move in this direction, providing a convenient way to write code once and target multiple platforms simultaneously. The main alternatives for that are Flutter (truly cross-platform, including Linux), Electron (desktop only), and React Native (mobile only).

ML.NET

ML.NET is an open-source and cross-platform machine learning framework. Its main advantage is letting developers use their .NET skills in this field.

It’s not as widespread and popular as R or Python ecosystems, but you can use tools like TensorFlow in combination with ML.NET.

There is also AutoML, a tool with a simple UI for creating custom ML models, simplifying the process even more.

What is .NET? Microsoft's Ubiquitous Development Platform Explained-3

A bit under the hood

Now, after we look into the more high-level elements that one would probably stumble upon and discuss comparing with other technologies, let’s dive deeper and see how all of that is possible and what advantages this approach of a restricted sandbox provides.

There are a lot of acronyms in the .NET world that describe its different elements, but Common Intermediate Language (CIL) and Common Language Runtime (CLR) are the most important. They provide building blocks for compiling languages like C# and F# to a single intermediate language and then running it.

Common Intermediate Language (CIL)

As you can guess from the name, CIL is another language in .NET, but this one usually is not for developers. It’s the product of compiling other high-level languages (like C# or F#). It’s important to note that it becomes independent of the language it was written in. That’s why it’s called common. And that’s the language that the runtime uses to execute it. However, it’s still not a final native code. That’s why it’s both platform and CPU-independent code.

It is a complex topic that deserves its own discussion, but I hope you got the general idea.

Common Language Runtime (CLR)

The Common Language Runtime takes over the execution of the program after the developer’s code is compiled into the intermediate language. It uses just-in-time compilation to compile CIL instructions into native code on the CPU.

Memory management, type safety, exception handling, garbage collections, etc. – all this is available thanks to Common Language Runtime.

Still, CLR itself is not the actual implementation of the runtime but a standard that various implementations need to rely on. For example, there are different CLR implementations in .NET Framework, .NET Core, and Mono. And details of those implementations provide features like cross-platform availability.

Other elements

Other elements of the .NET world that a developer probably won’t interact with directly but are good to know about to understand how the technology works:

  • Base Class Library (BCL) – A set of classes in the System.* and partially Microsoft.* namespaces that are available in all the supported languages.
  • Common Type System (CTS) – A standard describing how type definitions and specific values should be represented in the computer memory, regardless of the high-level .NET language used. A key goal is to provide compatibility between languages.
  • Common Language Specification (CLS) – As the name suggests, this is just a specification document whose primary goal is to define how programs written in different languages can be compiled into the intermediate language. The CLS is a subset of the CTS, so its rules apply to the type system.
  • JIT (Just-in-time compiler) – A part of CLR responsible for converting the intermediate language into machine code.

Common Language Infrastructure (CLI)

CLI is an open specification that includes many elements listed in this section (and some others that were not mentioned). It enables the creation of new implementations that can make it possible to run programs with those elements. For example, .NET Framework, .NET Core, and Mono are implementations of the CLI.

What else and what’s next?

.NET Standard

There is a misconception regarding .NET Standard, which makes people believe that it’s kind of a middle ground between the outdated .NET Framework and the modern .NET (Core). However, this is not true.

It’s not a framework or CLI implementation but a standard (yes, another one!) or specification for .NET APIs available in different .NET implementations. This means code targeting .NET Standard can be used by other code written for either .NET Framework or .NET Core.

Initially, .NET Standard 1.0 provided access to around 8,000 APIs and was supported by most .NET implementations, including .NET Framework 4.5 and older, Mono, mobile Xamarin, etc.

Minor versions of .NET Standard slowly added more APIs but dropped support for some implementations. .NET Standard 2.0 drastically increased the API count to 32,638 while still being compatible with .NET Framework 4.6.1 and older, Mono 5.4, etc. However, .NET Standard 2.1, despite providing all 37,118 APIs, completely dropped support for .NET Framework.

After that, Microsoft stopped releasing new .NET Standard versions because its primary purpose was fulfilled by the release of .NET 5, enabling all web, desktop, and mobile app APIs.

.NET Foundation

For a long time, .NET implementations had closed source code, which led to Mono and Xamarin. But things started to change, and in 2014 Microsoft decided to improve open-source development in the .NET world by introducing the .NET Foundation organization. It launched alongside some Microsoft projects like Roslyn (.NET compiler) and a set of ASP.NET products, and now it supports hundreds of projects.

The foundation provides support and different services for open-source projects in the .NET world.

NuGet

It’s hard to imagine a modern programming language without its packet manager. Packet managers make it easy for developers to share and use each other's code. The NuGet package is a set of .NET assemblies representing the actual code and metadata. These can be shared in private or public repositories. The most important one is NuGet Gallery, a repo maintained by Microsoft and the place to go for getting most of the most popular NuGet packages.

Developers can use command line tools or built-in UI interfaces available in modern IDEs or code editors to get new packages or maintain versions, for example.

Entity Framework [Core], ADO.NET

.NET capabilities are pretty versatile, and although I didn’t even check statistics, I’m pretty sure the most popular component of the platform is ASP.NET – a robust framework for building web applications. And where there’s a web app, there’s almost certainly a database.

Here, Microsoft also has developers covered at all levels. At the lowest level is ADO.NET, a technology providing access to relational and non-relational databases. Most technology-specific providers rely on ADO.NET while implementing their solutions (like Npgsql for PostgreSQL).

Aa a much higher, more abstract level, there is Entity Framework Core – a powerful full-fledged ORM and direct descendant of Entity Framework 6 and the whole EF family. Its feature set is impressive:

  • The code-first approach allows developers to describe models in .NET code and use tools to generate database migrations.
  • Support for dozens of database systems.
  • LINQ support – LINQ is a very powerful feature of the whole .NET ecosystem, and EF Core is designed to let developers write queries that will be transformed and executed on the database level. This also includes lazy loading.
  • Change tracking makes applications track what has been changed in entities and apply only those updates instead of full table updates.

And it’s just a fraction of what is available in .NET. But with an impressive set of features, there are some downsides, among the most prominent of which are:

  • Performance issues
  • High level of abstraction
  • Difficulty with debugging

What are the plans for the development of .NET

We’ve looked into many elements of the .NET world, but quite a few were not included in this piece. Some are outdated, not worth mentioning, and others are too new or niche.

One thing is obvious – Microsoft is not afraid to experiment, try something new and provide developers with exciting tools. This also creates some problems that developers must cope with. For example, relatively rapid development means some features are not thoroughly thought through. As a result, they are either left confusing developers by the number of available options or add breaking changes when Microsoft developers remove them.

The main focus will be developing ASP.NET, one of the world's most powerful web development frameworks. However, other technologies won’t be neglected in the near future either. For instance, Blazor is a modern alternative to other front-end frameworks, and MAUI is an alternative to Flutter and other tools for cross-platform development. Even something like ML.NET, despite lacking the popularity of Python/R ecosystems, accomplishes the goal of letting developers use familiar .NET languages for machine learning.

Currently .NET can be used for many use cases, and Microsoft doesn't seem to be stopping its improvement of existing solutions alongside trying new things.

Thank you
We will get back to you as soon as possible

Looking for a tech partner to help you scale your project?

Let’s schedule a quick call to explore how we can support your business objectives.

Edward Robe

Let’s schedule a quick call to explore how we can support your business objectives.

Edward Robe

Senior Client Manager

0 Comments
name *
email *

Featured Case Studies