. Net core[Translations]

Source: Internet
Author: User
Tags dotnet

Http://www.cnblogs.com/Wahitler/p/5612895.html*********************What is the. Net core platform?

. NET core is a modular, cross-platform, open source implementation of the. NET Framework, which can run on Windows devices or on Linux and OS X. Unlike the traditional. NET Framework (features: A large, system-wide, run-time environment that can only run on Windows), you can use. NET core to create modular libraries and applications that target multiple platforms, and. NET core can be deployed with applications.

. Net Core Features

Let's take a macro look at the features of. Net Core

Cross-platform support

. NET Core applications can run on both 32-bit and 64-bit Windows platforms, and can also run on OS X and Linux.

Conversely, applications written based on the traditional. Net framework can only run on Windows. Note that the UWP generic application can only run on Windows desktop programs, tablets, and Windows Phone phones with the. Net core implementation.

Open source

Both the. NET Core runtime (CoreCLR) and the base Class library are open source, and the source code for. NET core is freely available, which means:

    • Design notes, functional specifications, and specific implementation documents are all public
    • Code review for. Net Core is public
    • You can make a bug public by using GitHub's provided features, suggest your source code, and you can submit a request for a new feature, or you can write your own code.
    • You can also download all the source code to compile on your machine. Runtime and the base Class library, and some tools can be compiled on any platform.
Console Apps

The traditional. NET Framework can be created on Windows to run the Create console apps,.net core as well, but. NET core improves the control application:

    • Cross-platform: the console program can run on Windows,os x and Linux
    • Native compilation: Combines the benefits of a managed program with the performance of a native, C + + application
Easy installation

Because. Net core is not a component of an operating system, it is now installed:

    • No administrator privileges required
    • There is no need to touch the system components, which means you do not need to write to the operating system directory and the registry.
    • It's easier to copy some files to the target computer, or to compile the native framework into your app.

This way, new developers can get started in less than a minute. NET, including downloading the framework and tools. can be from here.

Simple release deployment

As an OPS person, deploy a development department to you. NET application, the first thing you have to do is to go to the server to check whether the. NET Framework version meets the requirements, and if it does not meet the need to install a basic version that can run the program, which will be a great problem for operations personnel
Compared with. Net Core has two ways of releasing deployment:

Portable Apps

When deploying a portable app, you just need to deploy your program and its dependencies in addition to the. Net Core Library.
In order to run portable apps on the target machine, you need to install. Net Core. You don't need to think ahead about which platform your app supports, because. Net core is a standalone component.
In. Net core, portable apps is the default program type.

Self-contained Apps

Self-contained apps contains all of the dependencies, and. NET core runtime is also part of the software. Because you have the. NET core built into your app, you can run it regardless of which machine you're deploying. NET core is installed on. And even if someone on the previous machine installed. NET core, your. NET Core class library is isolated from the others '. NET Core class libraries.
The premise of this approach is that you have a platform-built. NET core in your program, such as you want to deploy on OS X, your app needs to have a built-in OS X corresponding. NET core, if your built-in. NET core is a Linux version, then you can't deploy it on OS X, This requires you to first consider the platform your application is facing.

. Net Core Components

Like the traditional. NET Framework,. NET core consists of a common language runtime called CORECLR (Common language runtime). As with the. NET Framework, the key in. NET core is also the class library.. NET core is Corefx, which is a modular class library set, not a single. NET Framework class library. This will allow your program to load what library it needs, and not load it.

Common language Runtime (the Common Language runtime)

The common language runtime--coreclr in. NET core is a lightweight runtime that provides many of the same services as the traditional. NET Framework runtime. These same services include:

    • A garbage collector that provides automatic memory management. The garbage collector allocates and frees memory; you don't have to do this through the program. Unlike C + +, you need to manage the allocation and release of operational memory yourself.. NET core also uses the same garbage collector as the. NET Framework, for more information, visit garbage Collection
    • A just-in-time (JIT) compiler that compiles il or. NET intermediate language (intermediate language) to the machine code. In some architectures, the JIT compiler supports SIMD hardware acceleration.
    • An exception handling mechanism that allows you to handle exceptions through Try/catch statements.
Libraries (the class library)

The. NET Core class library and the. NET Framework class library are very similar except for one major difference.
The difference is:
The traditional. Net Framework has many class libraries that are part of the operating system, and it is a Windows Update update that comes with Windows.
In the. Net Coe, it is a personal library of modules organized by functionality.

MICROSOFT.NETCORE.APP is included in the runtime, and it contains the basic types of all apps that are developed, including:

    • Underlying types, such as type bool, signed and unsigned integers, floating-point and char structures
    • String type: in. NET core, a string is a sequence of UTF-16 encoded cells.. NET core also includes a number of encoding types that allow you to convert UTF-16 encoded strings into other encoded byte arrays, for example: You can use the UTF8Encoding class to convert a string string of. Net core into a UTF-8 encoded byte array that represents a string string on Linux.
    • Task types, such as task and task, are used to support asynchronous programming.
    • Basic Thread Type
    • Console Class to support the development of console apps.

Additional libraries that need to be installed through NuGet packages

. NET Core tool (. NET core tools)

. NET core contains a cross-platform command-line SDK named. NET Core CLI (command-line Interface). This CLI is a set of Unix-friendly tools for writing. NET core applications. It makes the C # compiler and NuGet package management tools abstract, which means that you don't feel the presence of compilers and package management tools, and the application is ready to write. He can also be with. NET native tools are tightly integrated to produce high-performance native apps and libraries.
The benefit of the CLI is that developers can compile and test their code without having to install a large IDE, which is excellent on either their own computer or on a production server. Visual Studio Code and Visual Studio are used at the bottom of the CLI, you can choose different ides according to your needs. For example, you can use the CLI directly from a text-based device, or you can invoke the CLI inside the editor using IDE development.

In most cases, you can use the. Net Core CLI directly by giving dotnet.exe parameters, and below are the commands that are available dotnet.exe :

    • dotnet --help: Displays information about the. Net Core CLI command line
    • dotnet new: Initializing a C # project
    • dotnet new --lang F#: Initializing an F # project
    • dotnet restore: Restore all dependencies for your app
    • dotnet build: Write A. Net Core app
    • dotnet publish: Publish a portable or self-contained app. (See the "Simple Deployment" section)
    • dotnet run: Run the app from the source code
    • dotnet pack: Create a NuGet package in your app

      dotnet.exeThere is an extended model that allows you to add additional commands.

Language support and development environment (Language supports and development environments)

. NET core is language agnostic: any language that targets. NET core can be used to develop. NET core applications, with apps developed in different programming languages that seamlessly access types and members in one of these languages.

Currently, you can develop any of the two languages below:

    • C #, based on. NET Compiler Platform, also becomes Roslyn
    • F #.

We intend to support more languages in the future.
You have a variety of development environments that you can choose to use to write apps, including:

    • A simple text editor, such as Notepad on a Windows system, or WordPad
    • A programmer's editor, such as Visual Studio Code that requires a C # extension
    • An integrated development, debug, and test environment, such as Visual Studio Update 2
. NET Core and the. NET Framework

To better perceive what. NET core is, compare it to the. NET Framework:

. Net Core

Includes CORECLR, a lightweight runtime (runtime) that provides basic services, especially automatic memory management, garbage collector, and a base type library.

Contains Corefx, a set of personal modular assemblies that you can install to add to your app, unlike the. NET Framework 4.x, the. NET Framework 4.x always makes the entire. NET Framework class library available,. Net The core just needs to choose what you want. For example, if you are developing a vector-based app, you can download the System.Numerics.Vectors package instead of the expense of a large class library, which can significantly reduce the volume of your app and his dependencies.

Works with a wide variety of modern applications, for small devices with limited memory and storage

A number of technologies can be used to develop applications, such as ASP.
Developing web Apps, Windows communication Foundation (WCF)

Develop an application that is associated with an existing WCF Service, Workflow Foundation (WF) build workflow.

Can become an app local. In other words, the. Net core version can be tightly combined with your app, which can alleviate many version problems.

The. NET Framework 4.x

Contains the common language runtime (CLR), a fairly large runtime that can provide memory management, isolated application domains (application domain), and a large number of application services.

Contains the. Net Framework class library, which contains thousands of classes and members, not only very large but also a whole, whether your app uses a single type or their members (or most apps take advantage of a small subset of functions), they are always loaded and can be accessed at any time.

For traditional Windows desktop applications, including Windows Forms (WinForms) and Windows Presentation Foundation (WPF) applications, there are many techniques you can use to develop applications, such as ASP. NET and ASP. Web Form to build Web applications, Windows Communication Foundation (WCF) builds services that contain soap, Workflow Foundation (WF), and builds workflows.

Globally available in a given system. In other words, even though an app contains a specific version of the. NET Framework Installer, if the installer finds that it does not exist, it will install the full. NET Framework and be independent of app maintenance. This creates a version problem, especially if an app encounters an unintended version, or an app that runs on a version of the. Net framework that was not previously developed.
Starting with Windows8, the. Net framework is installed as a component of the operating system and is upgraded through Windows Update. For more information about the different. NET Framework versions built into different windows, please visit the. NET Framework System Requirements.

Summarize:

Although the. NET Framework 4.6.2 Preview and. NET core are targeted to different platforms, they represent different approaches to app development and deployment, but they are all compliant. NET Standard 1.5. It was an accident that they were able to provide a high degree of compatibility and uniformity of behavior with each other. Especially:

    • Experienced. NET developers can easily adapt to the development of. NET core when they want to develop applications for different devices and platforms.
    • . NET core developers can easily transition to using the. NET Framework to develop Windows desktop programs, tablets, and phones.
    • Class libraries written with the. NET Framework or. NET core can easily work on another platform.
. NET core implementations (. NET core implementation-specific)

Many development technologies rely on the customizable implementation of. Net Core. When you use these technologies to develop apps, you may not be aware that you are leveraging the benefits of. Net Core:

    • ASP.Net Core. ASP. NET core is a modular version of ASP. It can be run at the same time at the top with. NET Framework, and it is designed to build high-performance cloud and micro-services In the. Net framework, it is not intended as an alternative to ASP. For more ASP. NET core information, please visit Introduction to ASP.
    • .NET Native。 For Universal Windows Platform (UWP) applications written in C # and Visual Basic,. NET native is a compilation and deployment technology.. NET native compiles apps into native code, Static resource files are placed in the application set, which are the code that is being used by. Net Core and some other third parties. For more information about. NET Native, visit compiling Apps with. NET Native.
    • Universal Windows Platform (UWP) apps。 Universal Windows platform allows you to build an app that runs on Windows desktop, Windows tablet devices, Windows Phone phones. These apps can be uploaded to the Windows Store. UWP applications compile native code for their respective platforms through. Net native, For more information, visit Get started with Windows apps.

Original: https://dotnet.github.io/docs/getting-started/what-is-dotnet.html

. Net core[Translations]

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.