• [翻译]为你的服务器选择正确的.NET


    英文原文 By Daniel Roth

    ASP.NET 5 is based on the .NET Execution Environment (DNX), which supports running cross-platform on Windows, Mac and Linux. When selecting a DNX to use you also have a choice of .NET flavors to pick from: .NET Framework (CLR), .NET Core (CoreCLR) or Mono. Which .NET flavor should you choose? Let’s look at the pros and cons of each one.

    ASP.NET 5 基于跨平台(Windows,Mac和Linux)DNX,DNX本身也有基于不同的.NET运行时版本可选:.NET Framework(CLR), .NET Core(CoreCLR)或者Mono。选哪个.NET版本呢?让我们看看他们之间区别。

     

    .NET Framework

    The .NET Framework is the most well known and mature of the three options. The .NET Framework is a mature and fully featured framework that ships with Windows. The .NET Framework ecosystem is well established and has been around for well over a decade. The .NET Framework is production ready today and provides the highest level of compatibility for your existing applications and libraries.

    .NET Framework是三个版本中最广为人知以及最成熟的版本。.NET Framework以Windows为载体,成熟且功能要素完备。.NET Framework的生态系统已经被应用了超过10年,并且得到了认可。.NET Framework应用于生产并且能为你的现有应用和类库提供高兼容性。(自夸得我不想翻译)

     

    The .NET Framework runs on Windows only. It is also a monolithic component with a large API surface area and a slower release cycle. While the code for the .NET Framework is available for reference it is not an active open source project.

    .NET Framework只能运行在Windows上。而且他还是一个拥有数量庞大API的(臃肿的)单一组件,发布速度还很缓慢。.NET Framework的源代码仅提供了参考阅读,并没有开源工程项目,所有它的开源还不够积极。

     

    .NET Core

    .NET Core 5 is a modular runtime and library implementation that includes a subset of the .NET Framework. .NET Core is supported on Windows, Mac and Linux. .NET Core consists of a set of libraries, called “CoreFX”, and a small, optimized runtime, called “CoreCLR”. .NET Core is open-source, so you can follow progress on the project and contribute to it on GitHub. 

    .NET Core 5是一个模块化的运行时和类库实现,它包含了一个.NET Framework的子集。.NET Core支持Windows,Mac和Linux。.NET Core是开源的,你可以在GitHub上跟踪它的开发进度或者作出贡献。

     

    The CoreCLR runtime (Microsoft.CoreCLR) and CoreFX libraries are distributed via NuGet. Because .NET Core has been built as a componentized set of libraries you can limit the API surface area your application uses to just the pieces you need. You can also run .NET Core based applications on much more constrained environments (ex. Windows Server Nano).

    .NET Core由CoreFx(类库集)、经过优化的非常小的运行时(Microsoft.CoreCLR)组成,并且CoreFX类库通过NuGet发布。由于.NET Core是由一堆类库组成的,你就可以根据你的应用的需要仅选择你需要的类库部分。你甚至可以将.NET Core的应用程序运行在更多受限的环境(举例:Windows Server Nano)。

     

    The API factoring in .NET Core was updated to enable better componentization. This means that existing libraries built for the .NET Framework generally need to be recompiled to run on .NET Core. The .NET Core ecosystem is relatively new, but it is rapidly growing with the support of popular .NET packages like JSON.NET, AutoFac, xUnit.net and many others.

    .NET Core的API被重新实现以支持更好地组件化。这意味着现有的为.NET Framework构建的类库需要重新编译才能够在.NET Core上执行。.NET Core的生态系统刚刚建立,但是发展迅速,已经有很多流行的应用广泛的类库支持了,比如(JSON.NET, AutoFac, xUnit.net )

     

    Developing on .NET Core allows you to target a single consistent platform that can run on multiple platforms.

    Please see Introducing .NET Core for more details on what .NET Core has to offer.

    基于.NET Core开发,你在一个单一的开发平台上就能够开发出运行在各种操作系统平台上的程序。请参看Introducing .NET Core获取更多的关于.NET Core提供的功能详情。

     

    Mono

    Mono is a port of the .NET Framework built primarily for non-Windows platforms. Mono is open source and cross-platform. It also shares a similar API factoring to the .NET Framework, so many existing managed libraries work on Mono today. Mono is not a supported platform by Microsoft. It is however a good proving ground for cross-platform development while cross-platform support in .NET Core matures.

    Mono是为非Windows平台实现的兼容版.NET Framework。Mono开源并且跨平台的。它也提供了一个类似于.NET Framework的API,所有很多现存的托管类库也能够在Mono上运行。Mono并不是微软官方提供支持的开发平台。但在.NET Core的成熟稳定过程中,Mono依然是跨平台开发的一个被证实过的好选择。

     

    Summary

    The .NET Execution Environment (DNX) and .NET Core make .NET development available to more scenarios than ever before. DNX also gives you the option to target your application at existing available .NET platforms. Which .NET flavor you pick will depend on your specific scenarios, timelines, feature requirements and compatibility requirements.

    总结

    DNX和.NET Core使得.NET的适用开发场景空前。DNX还提供了多个可用的.NET平台供开发人员做选择。选择哪种版本取决于你的特定场景,开发计划,功能需求和兼容性需求。

  • 相关阅读:
    Java中equals和==的区别
    Golang 中的 defer 关键字
    浅拷贝与深拷贝
    svn 忽略某些文件夹或者文件类型
    使用 nvm 管理 nodejs 版本
    数据库索引
    解决 vscode 安装 golang 环境出现 connection failed 的情况
    TSQL 如何批量修改/转移大数据量数据.
    从别人那儿陶的一个配置文件处理方法.
    分析sqlserver查询计划
  • 原文地址:https://www.cnblogs.com/binking338/p/5047921.html
Copyright © 2020-2023  润新知