.Net Framework Vs .Net Core Vs .Net Standard

Introduction 

 
In this article, I am going to explain .Net framework, .Net Standard and .Net core.
 
The first question that comes in our mind is,  how many .Net software frameworks are available in the market?
 
The answer is:
 
Currently Microsoft has three frameworks available in the market,
  • .Net Framework
  • .Net standard
  • .Net core
So a few questions which come to mind:
  1. When to use which framework?
  2. Difference between these frameworks?
That’s what this article is about. I will try to explain these frameworks in this article.
 

.Net Framework

 
Microsoft introduced .Net framework in 2000 to build Web and Windows applications (desktop applications) using different languages like C#, Visual Studio, F# etc.
 
This framework has been widely used in the IT industry for more than 20 years. It is a very popular Microsoft framework. This is the first managed framework released by Microsoft.
 
The  latest available version of .Net Framework is 4.8.
 
Below are some important concepts of .Net framework, 
  • Intermediate Language (IL) - .Net code is compiled into a special language called Intermediate Language. It is stored in .dll or .exe files.
  • Common language runtime (CLR) - Common language runtime handles the execution of application.
  • Just In Time (JIT) - CLR used assembly and turn into machine code through process. This process is known as Just In time (JIT) compilation.
  • Base Class Library (BCL) - Microsoft provided reusable library which can be used in your application while developing code.
Expect these concepts; .Net framework has CTS (Common Type System), Garbage collection, Memory management etc.
 
Below are a few important points about .Net Framework,
  1. In case of ASP.Net Web Forms application, we should use .Net Framework. .Net Core has no plans to introduce ASP.Net Web Forms in future.
  2. ASP.Net pages are not included in .Net Core.
  3. WCF Server implementation is only available on .Net Framework.
  4. Window Workflows is only available in .Net Core.
  5. ADO.Net Data Services is only available in .Net Core.
  6. Some Third party and Microsoft platforms don’t support .Net Core.
  7. Some Azure services or SDK not available for .Net Core.
In simple words, we can say, .Net Framework can be used for web and window application development which works with Windows operating system.
 

.Net Core

 
Software development and app development trends have changed in the last few years. Now the IT Industry needs platforms which can be used with different operating systems.
 
As .Net framework was working with only Windows, Microsoft introduced .Net core for cross platform as per market demand.
  1. Below are a few important points about .Net Core,
  2. .Net core is free, open source and cross platform implementation of .Net.
  3. It can be used for Windows, Linux and Mac operating systems.
  4. .Net core supports C#, Visual Basic and F# languages for development.
  5. Flexible deployment – (User-wide or System-wide)
  6. Includes common line tool and also works with deployment tools like Docker.
  7. It supports Console, Asp.net Core, Cloud and Universal window platform. Windows Form and Window Presentation form(WPF) are not part of .Net core.
  8. Used for creating High-Performance and Scalable systems.
  9. .Net Core can be used whenever Micro services are required.
Below diagram shows .Net Core release lifecycles
 
.Net Framework vs .Net Core vs .Net Standard
 

.Net Standard

 
Before starting with .Net Standard, let’s discuss .Net framework and .Net core architecture using the below diagram.
 
.Net Framework vs .Net Core vs .Net Standard
 
We have already discussed BCL (Base Class Library) in .Net Framework section. As per the above image, you can see all three frameworks have their own base class libraries.
  1. .Net Framework has .Net Framework BCL
  2. .Net Core has .Net Core BCL
  3. Mono has Mono BCL
Let’s assume that I have shared a library developed in .Net Framework. I want to use this Library in multiple projects in which some of the projects have been created in .Net core. That’s where the problem starts. Can you guess what’s the problem???

.Net Framework and .Net core have different BCLs, hence .Net Framework library is not compatible with .Net core and vice versa. To solve this problem Microsoft introduced .Net standard. 
 
.Net Framework vs .Net Core vs .Net Standard
 
As per the above image, .Net standard replaces all different BCLs for all frameworks. In other words we can say, all frameworks have common BCLs called .Net standard.
.Net standard is a set of APIs that all .Net framework implements.
 
.Net standard can replace all versions of .Net Framework/.Net core etc. Microsoft explains that using the below diagram,
 
.Net Framework vs .Net Core vs .Net Standard
 
We can conclude based on the above matrix,
 
Lower .Net standard in the  means it will target to more applications. If your .Net standard in 1.0 so it will run in all applications.
 
If .Net standard has a higher version then more APIs/inbuilt library like “System.data” are available.
 
So based on project requirements .Net standard library needs to be created. 
 
Latest version of .Net standard framework is 2.1.
 
Following are a few available Microsoft Visual Studio templates:
 
.Net Framework vs .Net Core vs .Net Standard
 
As per the above image you can see, .Net standard framework has only Class library. Once we have decided platforms and project types, based on the requirement we can use the accurate version.
 
Hope you enjoyed this article and found it useful. Thank you for reading this article.