.NET Framework vs .NET Core: The Future of .NET

Published: 2022-02-18 11:14:45

Microsoft has been rapidly developing and releasing new technologies during the past years. When I started programming in 2015, .NET Core was just announced, and the primary software framework of Microsoft was the .NET Framework. .NET Core has come to the market as a modern solution to addresses the limitations of the traditional .NET Framework and has earned much popularity since it was released. 

Developing complex business applications, primarily for financial services companies, I have worked with both the .NET and .NET Core frameworks. Thus, in this article, I share my experience and focus on the comparison between the two .NET frameworks. I walk you through some .NET basics, give some examples from my daily projects, as well as what to keep eyes on. 

### .NET FRAMEWORK ECOSYSTEM
Before looking at the two frameworks, let’s start with some high-level picture of the .NET Ecosystem. It has three major components: .NET Framework, .NET Core and Xamarin, as it can be seen on the figure below. 

**Xamarin** is used for building cross-platform mobile applications. It targets iOS, Android or Windows Phone devices. It is not a subject of this article because if the solution you develop is a mobile application, Xamarin is currently the only choice.

**.Net Framework** is the first software framework introduced by Microsoft ,back in 2000. It includes a runtime environment for creating Windows apps and web services and supports websites, services, and desktops apps. It has been in use for already 20 years. which proves its reliability, also backed up by the many tools and libraries developed for it.

**.NET Core** was introduced in 2016 as an open-source and cross-platform framework. It is used for building applications for all operating systems, including Windows, Mac, and Linux. .Net Core supports multiple languages – C#, Visual Basic, and F#. The focus when creating the framework was on the highly-performing and scalable systems. It is also optimized for developing microservices.

## WHEN TO USE .NET FRAMEWORK


### When the current environment is working and stable

.NET Framework is а very good choice when you have а stable working environment. When I started working in my current team all the projects were already developed and tested. The team had created a stable environment and it was working. When there was a need for new functionality, there was no point to switch to .NET Core simply because it was the modern solution. We preferred to have stability over time. 

### When target libraries are only working for .NET Framework

Lately, while researching how to build a new Customer Identity and Access Management system for a leading financial services company in South Africa, the team stuck up to LDAP protocol implementation on .NET Core on the Azure cloud. It turned out there are some libraries which are supported by .NET Framework but not by .NET Core. As it was a new system, our thoughts were to start writing in on .NET Core. However, we have already had a working implementation that was using the Directory services library. We used it as a reference to develop the new system, but it turned out that the library was not migrated to .NET Core. It was available only for .NET Framework. Even though we wanted to migrate to the new framework, the LDAP implementation was holding us back. After further investigation, we have found out another library that helped us .NET developers state in preview 5 summaries that the Directory services migration is done in their release and it is now available for cross-platform.

## WHEN TO USE .NET CORE


### When building a new .NET application
As I have already noted, our team prefers using .NET Core when starting a new project. We are confident that it is the future of .NET because it provides the best possible performance and scalability. According to Microsoft, .NET Core is also a preferable solution for microservices architecture because it needs a much lower number of servers/VMs. In my project, in which we implemented a microservices architecture, we managed to save cost in infrastructure and hosting using .NET Core. 

### When targeting cross-platform or cloud deployment

When talking about infrastructure and hosting, I have to once again mention that .NET Core applications run on multiple platforms. Our team has been actively helping clients transfer applications to the cloud because of reduced maintenance costs compared to on-premises servers or VMs. For example, most of the new services we develop are deployed on Azure. Continuous integration tools using dedicated servers are decommissioned and all the pipelines are migrated to Azure DevOps. Cloud deployment is already very popular within the team. 

## THE FUTURE OF .NET FRAMEWORK – .NET 5
The next big release of .NET is .NET 5,  expected in November 2020. According to Microsoft, this new project will be a game-changer. Do you know why is it called .NET 5? The current release of .NET Core is 3.1 and it would confuse users that are familiar with the .NET Framework, which has been using 4.x series for a long time. Additionally, Microsoft wants to communicate that .NET 5 is the future for the .NET Platform. Actually, .NET 5 represents the next version of .NET Core, so we can use the name .NET Core 5. The message here is that the .NET Framework will not have any more releases. However, as all Microsoft products, it will be supported for several years until they migrate to use only .NET Core.

.NET 5 is the next step forward with .NET Core. The new version aims to improve .NET as it follows: 

- .NET 5 will be the single and unified .NET runtime and framework used by developers, this will provide the opportunity to have the same developer experience and runtime behaviors. 

- The new framework will expand the capabilities of .NET by combining the best of .NET Core, .NET Framework, Xamarin and Mono

- According to Microsoft’s .NET team, there were more than 100 repositories. Migrating to .NET 5 made them unify them so that users can count them using their fingers. All the repositories continue to be open-source.

I expect that .NET 5 will truly be a game-changer. It combines all the best of .NET to produce a standard for building the next high-tech application in the wide world. No matter your target development platform, you can use only .NET 5 (See Figure 2). This will decrease the learning curve needed for switching over different platforms. Many performance improvements are also part of the latest release. The .NET community understands the hype around containers, especially talking about Docker. Consequently, there are many optimizations for containers as well. I can say that Microsoft sparked my enthusiasm for the feature!

## TO WRAP UP

To be able to offer our clients the best of the .NET technologies, it is a must to have a look into the future and be flexible to use new technologies. However, we live in the present. .NET 5 is still in the preview version. Even after it is released, .NET 5 is not going to be supported for a long time. So, we need to give some time for the .NET community to develop a more mature software before implementing it in production use. “Version 2 never works from the first time,” as it was stated during .NET Conf: Focus on Microservice. I expect for the .NET 6, to be the more stable release that we are waiting for in 2021.

Meanwhile, it is good to know the difference between the two available frameworks – .NET Framework and .NET Core. This will give you the chance to choose the best framework for your project. 

In the end, you can just go for the latest stable version, whether it’s .NET Framework or .NET Core. This will ensure high performance, security, and coding improvements. If you have the chance, I advise migrating from .NET Framework to .NET Core 3.1. Taking from there, it will make your life a lot easier when the time comes to migrate to the .NET 5 version. 

As a Gold Microsoft Partner, we have been continuously advancing our expertise to help companies worldwide make most of the Microsoft technologies. Learn more about [Microsoft technology capabilities and custom .NET development services.](https://accedia.com/custom-net-development-services/) 

#### REFERENCES

R. Lander, “Announcing .NET 5.0 Preview 5,” Microsoft, 10 June 2020. [Online]. Available: https://devblogs.microsoft.com/dotnet/announcing-net-5-0-preview-5/. [Accessed 21 August 2020].
 R. Lander, “Introducing .NET 5,” Microsoft, 6 May 2019. [Online]. Available: https://devblogs.microsoft.com/dotnet/introducing-net-5/. [Accessed 21 August 2020].
S. Hunter, “Announcing .NET 5 Preview 4 and our journey to one .NET,” Microsoft, 19 May 2020. [Online]. Available: Announcing .NET 5 Preview 4 and our journey to one .NET. [Accessed 21 August 2020].
“.NET Core vs. .NET Framework for server apps,” Microsoft, 28 April 2020. [Online]. Available: https://docs.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server. [Accessed 21 August 2020].
M. Chand, “Difference Between .NET and .NET Core,” 5 July 2020. [Online]. Available: https://www.c-sharpcorner.com/article/difference-between-net-framework-and-net-core/. [Accessed 21 August 2020].

The articles is written by Todor Vasilev - Software Consultant at Accedia, specializing in developing custom web applications. He is determined to overcome any obstacle on the way to deliver a valuable product or finish an ultra marathon.