今日要点:
- .net core/mono/.net framework
- net 体系四大组成部分
- .net core/framework/standard之间关系
- 什么是.net standard
.net core/mono/.net framework
Historically, the .NET Framework has only worked on Windows devices. 【不能跨平台,只能在windows上使用,称为.net framework】
The Xamarin and Mono projects worked to bring .NET to mobile devices, macOS, and Linux. 【非微软血统的.net跨平台实现】
.NET Core provides a standard base library that can now be used across Windows, Linux, macOS, and mobile devices (via Xamarin).【微软血统的.net跨平台实现,称为.net core】
There are four major components of .NET architecture:【.net 体系有四部分组成】
-
Common language specification【公共语言规范,既公共类型系统。】
(CLS) defines how objects are implemented so they work everywhere .NET works. CLS is a subset of Common Type System (CTS) — which sets a common way to describe all types.
-
Framework class library【类库,类似JDK】
(FCL) is a standard library that collects reusable classes, interfaces, and value types.
-
Common language runtime【公共语言运行时,类似JVM】
(CLR) is the virtual machine that runs the framework and manages the execution of .NET programs.
-
Tools such as Visual Studio
to create standalone applications, interactive websites, web applications and web services.
.NET Core vs .NET Framework【.net core/.net framework/.net standard之间的关系】
Microsoft maintains both runtimes for building applications with .NET, and they share many of the same APIs. This shared API is what is called the .NET Standard.
![](https://img.haomeiwen.com/i2635028/6e03bb052476feee.png)
![](https://img.haomeiwen.com/i2635028/a81726628e003381.png)
什么是.net standard(标准库)
The.NET Standard is a formal specification of .NET APIs that are intended to be available on all .NET implementations. The motivation behind the .NET Standard is establishing greater uniformity in the .NET ecosystem. [ECMA 335(https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/dotnet-standards.md)
continues to establish uniformity for .NET implementation behavior, but there is no similar spec for the .NET Base Class Libraries (BCL) for .NET library implementations.
The .NET Standard enables the following key scenarios:
- Defines uniform set of BCL APIs for all .NET implementations to implement, independent of workload.
- Enables developers to produce portable libraries that are usable across .NET implementations, using this same set of APIs.
- Reduces or even eliminates conditional compilation of shared source due to .NET APIs, only for OS APIs.
网友评论