Preparation before .NetCore -.NET Core Technology Migration

Some time ago to migrate .NET Core done a lot of testing and assessment of water, today tidy for everyone to share. To the following sections:

1. .NET Core of Origin

2. Why migrate .NET Core

3. .NET Core3.X Key Features

4. .NET Standard and .NET Core

5. .NET Core Roadmap & version selection

Next, we expand speak in detail.

A, .NET Core origin

   This is more like a science of information, because of the small team of partners are halfway decent, glorious history of .NET is not very understanding, it is necessary to bring everyone to read it .NETCore origin:

   Said .NET Core, you need to talk about .NET. Java then just emerging in full swing, Microsoft is also very respected Java, then Windows platform, Microsoft Java Virtual Machine is implemented in accordance with the standard JVM, reportedly it was also the best performance of the Java Virtual Machine . But Microsoft also have ulterior motives, Microsoft tried to find properties on the point Windows platform, Java is bound to want a little taste on the Windows platform, while Sun Microsystems is a bit narrow-minded, so just like the Sun's trouble breaking up Microsoft, then Microsoft on the launch of .NET, .NET from birth in fact draws Java, and then another step by step to achieve beyond the characteristics in terms of language, form development. After the slow development of Java 1.6 version, behind Java language features also draws on .NET.

   While it has been a good .NET development, but also WPF, Unity3D has appeared so competitive framework. But the .NET platform at some of the larger projects, is not affected by the Internet company's favorite (although Jingdong, Dangdang, Ctrip was on .NET technology roadmap). But because .NET is not open source framework, nor is cross-platform framework, it will bring the following issues:

     Cost: Select .NET should choose Visual Studio, Windows Server, license costs can not be ignored;

     Ecology: no contributions from the community, that the .NET framework is not born good soil, although Microsoft technical communities of special support, but overall not ideal

     Talent: Unable to attract the company's outstanding line of Internet engineers to join, because they use Java, Go, etc., but after the birth of .NET Core will be greatly changed, Tencent, Netease are in use.

    Even if there is such a strong Mono framework that allows .NET to run on Linux, but this is not enough. After all, Mono can only play a limited part of .NET capabilities.

    At the same time, the popularity of cloud computing, cross-platform overwhelming demand, Linux as the Fuji OS Server, .NET does not support Linux, embarrassing!

    In addition, the container era is irreversible, strong dependence with Windows, and how the Docker?

    In short, in the form of forced, embrace change and the future, .NET Core emerged.

Second, why should migrate .NET Core

   Summed up the following, we can add:

  • .NET Core represents the future direction of development of .Net
  • The new product features, technical support for Microsoft's focus on priority support in the latest version of .NET Core
  • Better code, improved performance, the contribution of everyone in the community, optimized code
  • Cross-platform support, support for deployment on Linux, can reduce the cost of VM
  • Docker deployment support, lower cost, higher resource utilization, the future composition of the core cloud native
  • For the modern Internet applications, micro-service architecture, and better integration DevOps
  • Open Source: https: //github.com/dotnet/core
  • Better ecological and community

Three, .NET Core3.X main features

   Supports both Windows and Linux, MacOS, to meet the needs of different developers, Web developers to provide ASP.NET Core, commonly used for database access, provide EF Core, for machine learning, provides ML.NET. You can according to their business needs, choose the right technology.

Four, .NET Standard and .NET Core

 Let me talk about the origin of the next thing:

 .NET Framework since 2002, has been in Release new version does not support cross-platform

 .NET Core is to support cross-platform produced similar there Mono, Xamarin

  In this way, there have been two sets of codes, two sets of libraries for developers to control of both sets of SDK, it will have split the community and technology.

  因此,.NET 要统一类库标准,统一所有的API定义,这就是.NET Standard. 如下图:

  

 .NET Standard的统一:

  .NET Standard定义了.NET平台,统一实现的一组API。实现.Net Standard API的平台都与目标.Net Standard库兼容;

  .NET Framework和.NET Core都是.NET Standard的标准实现。 .NET Standard是二者的交集。

   但是.NET Framework和.NET Core存在其个性化、扩展的类库,需要牺牲兼容性,即:

   假如用.NET Framework的个性化SDK。例如注册表、Windows Service、Winform,这样只能部署在Windows中。

   假如用.NET Core的个性化SDK,部署运行时,与Windows环境下.NET Framework不兼容。

   所以,如果应用程序采用.NET Standard,同时支持.NET Framework和.NET Core,则可以实现两者的兼容。一套代码既支持运行在.NET Framework运行时下,又支持运行在.NET Core运行时下。

   同时.NET Standard的版本对应.NET Core、.NET Framework、Mono、Xamarin等的版本,有个对照表:

   

   这张表非常重要。体现了一个规则:

   假如程序的目标框架Targetframework 使用.NET Standard2.0, 则支持:

   .NET Core 2.0版本的工程可以引用

   .NET 4.6 版本的工程可以引用

 

    但是低版本的.NET Core和.NET Framework则无法引用。

五 .NET Core Roadmap&版本选择

 先看一下.NET Core最新的Roadmap:

  

 最新的.NET Core 3.1 将2019年11月发布,同时是LTS版本。如果大家现在开始迁移.NET Core,建议选择一个大版本、LTS版本。我们也将选择这个版本。

 

周国庆

2019/10/03

 

  

   

Guess you like

Origin www.cnblogs.com/tianqing/p/11619005.html