The difference between .Net Framework and .Net Core

The difference between .Net Framework and .Net Core

1. Introduction to .net platform

.net platform is divided into three parts (.net 5 is said to be unified, which I put aside the .net 5): .net Framework, .net Coreandxamarin

  • .net Framework : Released in 2002, now many companies are using it, can develop:

    • Window desktop program: winform, UWP, wpf, etc.

    • Web applications: Asp.Net webform, Asp.Net MVC

  • .net Core : Released on June 27, 2016, it is Microsoft's latest exit from open source, cross-platform platform, which can be used to create applications running on mac and Linux

  • xamarin : Mainly used to build mobile APP, the main language used is C # language (but because there are not many users, so there are few cases that can be referred to)

1.1 How to choose between .net core and .net framework

.net coreAnd .net frameworkcan write web applications, both have a lot of shared components (ef libraries and other libraries can be run on the .net framework or .net core), it can be shared between the two codes, but they are fundamentally Differences, which need to be selected according to the goals achieved

Select .net core

  • Cross-platform requirements

  • Microservices

  • Using Docker containers

  • Systems requiring high performance and scalability

Choose .net framework

  • The current project uses the .net framework (it is recommended to extend rather than migrate)

  • A third-party .net library or NuGet package that is not currently supported in .net Core is used in the developed program

  • Use technologies that are not yet supported in .net Core (for example, winfrom is not supported in .net core 2.x, .net core 3.x is already supported)

    • The implementation of WCF service is currently unavailable in .net core

    • Asp.Net Web Forms application is currently only available in .net framework

1.2 Shared library in .net core and .net framework

Because .net core is an emerging system ecosystem, some libraries previously used in .net framework are not available in .net core. In order to make up for this vacancy as soon as possible, Microsoft introduced the .net standard to provide The public standard under the ecology means that you can create libraries (even including xamarin) that are directly used in .net core or .net framework. As long as you make sure that the NuGet package of the .net standard library is added to the .net application, you can use it.

.net standard can be regarded as the successor of the portable class library PCL, which simplifies the business for different platforms. In the configuration of PCL based on platform capabilities, .net Standard provides a carefully selected API set.

But different versions of .net Standard adapt to .net core or .net framework versions, which feels like walking away from DLL hell and coming to .net Standard hell

img

asp.net core 2.x consists of .net Standard library, so it supports both .net core operation and .net framework operation

 

Some content mentioned in other blogs is used in the article:

https://www.jianshu.com/p/78c7590674d4

https://www.cnblogs.com/itzhangxp/p/8322364.html

https://blog.csdn.net/weixin_30312557/article/details/95216051

Official Microsoft document: https://docs.microsoft.com/zh-cn/dotnet/standard/choosing-core-framework-server?toc=%2Faspnet%2Fcore%2Ftoc.json&bc=%2Faspnet%2Fcore%2Fbreadcrumb%2Ftoc. json & view = aspnetcore-2.2

https://www.cnblogs.com/haogj/p/9220653.html

 

 

Guess you like

Origin www.cnblogs.com/sunhouzi/p/12685163.html