What is a. NET?

Source: Internet
Author: User
Tags silverlight

Now all kinds of. NET flying, not to mention the novice, even my such a veteran has almost been in the way. What exactly is. NET? Easy to understand, what is. Net? What is the. NET Framework? What is. NET Core? This article is very long ah, do not know that you have finished no, in fact, the most critical is the core of a few concepts, we start from the beginning to comb the natural clear.

The. NET Framework era

In 2000 years, Microsoft released. NET 1.0. Then, in 2001, it became an international standard.

Standards are needed, and Microsoft's first implementation of this standard is the. NET Framework, which is also the. NET that we've been familiar with over the years. However, this. NET implementation is based on the Windows platform, which contains a large number of Windows-based implementations, even many Windows-specific content, such as GDI support and so on. Microsoft's previously promoted. NET cross-platform, in fact, is a cross-platform on the Microsoft platform. Because the. NET Framework is directly based on the Windows platform, the. NET Framework programs are not really cross-platform, such as running on Linux.

A diverse. NET implementation

. NET is really a very good design, it attracts a lot of developers, so there are many other. NET implementations in the world. They themselves developed other implementations based on the. NET standard, for example, the very famous Mono is a free open source project hosted by Xamarin (formerly Novell, First Ximian).

However, various. NET implementations, including Microsoft's own. NET Framework, all seem to be. NET, and even can use C # to develop programs, are object-oriented, are incompatible, for example, their underlying support of the API is different. The result is that the assemblies you develop on each platform are not universally available. Because for some API, some platform support, some platform is not supported.

While developers can develop a class library that can support common types of. NET implementations by means of conditional compilation, it's obviously a daunting task, and you need to know which APIs are supported by each version of the implementation.

. NET Standard and. NET Core

By 2014, Microsoft's strategy had shifted to open source and cross-platform, and the. NET Framework was clearly unable to do this, and. NET Core came out, it was open source, a completely cross-platform. NET implementation, and Microsoft's second major. NET implementation. Now the problem, even for Microsoft, now has two major. NET implementations, in the end which is the authentic. NET?

There is a concept in the computer field, and if you cannot unify it, add an abstraction layer. Microsoft has also developed a new concept for. NET standard.

As the name implies,. NET standards is the. NET Standard, which is a set of specifications that defines what APIs should be included in the. NET implementation, and you can see the official instructions for this standard here. The main points are as follows:

    • Defines a unified set of APIs supported by the underlying class library for all. NET implementations
    • Enables developers to develop portable libraries that can be used in various. NET based on this standard

The advantage is that developers no longer have to check to see if a single API is supported on a per-platform basis, as long as the platform supports the version of. NET Standard, so long as the target platform supports a. NET specification, you can confirm that your class library can be common across. NET implementations. The higher the. NET Standard version contains more APIs, but less versatility, because not all platforms support so many APIs, it is clear that the lower the. NET standards compatibility is better because the fewer APIs it requires, the more platforms are supported.

For developers, with this. NET standard, it's much easier to develop a common class library.

Microsoft gives a list of the. NET standard standards supported by each version of each common platform.

. NET standard. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 2.0
. NET kernel . NET Core 1.01.0 1.01.0 1.01.0 1.01.0 1.01.0 1.01.0 1.01.0 2.02.0
. NET Framework 1. NET Framework 1 4.54.5 4.54.5 4.5.14.5.1 4.64.6 4.6.14.6.1 4.6.14.6.1 4.6.14.6.1 4.6.14.6.1
MonoMono 4.64.6 4.64.6 4.64.6 4.64.6 4.64.6 4.64.6 4.64.6 5.45.4
Xamarin.iosXamarin.ios 10.010.0 10.010.0 10.010.0 10.010.0 10.010.0 10.010.0 10.010.0 10.1410.14
Xamarin.macXamarin.mac 3.03.0 3.03.0 3.03.0 3.03.0 3.03.0 3.03.0 3.03.0 3.83.8
Xamarin.androidxamarin.android 7.07.0 7.07.0 7.07.0 7.07.0 7.07.0 7.07.0 7.07.0 8.08.0
Universal Windows platform Universal Windows Platform 10.010.0 10.010.0 10.010.0 10.010.0 10.010.0 10.0.1629910.0.16299 10.0.1629910.0.16299 10.0.1629910.0.16299
WindowsWindows 8.08.0 8.08.0 8.18.1
windows phone Windows Phone 8.18.1 8.1 8.1 8.18.1          
Windows Phone Silverlightwindows Phone Silverlight 8.08.0
The. NET Core and. NET Framework choices

Both the. NET Framework and. NET Core are. NET, except that the APIs they support are not exactly the same. Developers are more headache, are Microsoft's son, we should choose Which?

From a level of support, Microsoft is primarily promoting. NET Core to support cross-platform applications, with support for the. NET Framework coming down second.
. NET Core started catching up with the. NET Framework's API number from 2.0 to support. NET Standard 2.0, which is significantly faster than the. NET Framework. SPAN<T> has been supported in. NET Core 2.1, which is not supported by next year's. NET Framework 4.8. Therefore, the development of new applications should prefer. NET Core.

However, there is a problem you have to think about,. NET Core is cross-platform and must support all platforms, so it is not possible to include some Windows-specific APIs, such as registry access, so. Theoretically, if you want to use some of the Windows platform specialist APIs in development, it will not appear in. NET Core.

Don't worry, Microsoft started with. NET 2.0, Microsoft provided Microsoft.Windows.Compatibility to solve this problem, the package provides an additional about 20000 API to support the Windows platform. You can add a reference to this package in a. NET Core project.
The Windows Compatibility Pack is available through the NuGet package Microsoft.Windows.Compatibility and can be referenced from a project that targets. NET Core or. NET Standard. It provides approximately 20,000 APIs to support the APIs that were originally supported in the. NET Framework, but not in. NET Standard.

For packages in the NuGet library, it has reached about 70% support in announcing. NET Core 2.0, which was released in 2017/8/14.

Summarize
    • For. NET, the first thing to realize is that. NET standards is the. NET Standard, which has its own version number, and the current version is 2.0.
    • Under this. NET Standard, there are many. NET implementations, notably the. NET Framework and. NET Core, each of which has its own implementation version, and the. NET Framewrok is now 4.7.2, and. NET Cor The E is 2.1. Check out the instructions here.
    • The most abundant API is the. NET Framework, but it only supports the WINDWOS platform.
    • The 2.1 version of. NET core, plus Microsoft.Windows.Compatibility, is already close to the support level of the. NET Framework, and the class library in NuGet has overwhelmingly supported. NET core, and Microsoft is still crazy Mad to fill the gap.
    • If this is a new project, it is strongly recommended to develop based on. NET Core
    • You can now develop. NET Core applications using both Visual Studio and Visual Studio Code.

A picture wins thousands of words

What is a. NET?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.