zoukankan      html  css  js  c++  java
  • [Translation] Introduction to ASP.NET Core

    Orignal Link: Introduction to ASP.NET Core

    09/13/2018

    The following content typing by hands. 

    asp.net core 是一个跨平台,高性能的开源框架, 它能构建 现代的,基于云的,互联网交互的 应用。

    使用asp.net core, 你可以:

    * 构建 web 应用和服务, 物联应用, 和移动后端。

    * 使用你喜欢的开发工具基于操作系统( Windows, MacOS, Linux )

    * 部署到云端 或 内网

    * 运行在 .NET Core 或 .NET Framework上

    为什么使用 asp.net core?

    Millions 开发者使用了(继续使用) asp.net 4.x 创建web应用. asp.net core 是重新设计的asp.net 4.x,  伴随的是架构的变更( result in a leaner? 更加模块化的框架 )

    asp.net core 提供了以下几点优点:

    * 一个统一的方式去构建 web UI and web apis.

    * 与现代开发的集成, 客户端框架 和 开发工作流程.

    * 一个为 云准备, 基于environment的配置系统

    * 内建 DI

    * 一个轻量级,高性能和模块化 http请求管道.

    * 能够宿主在iis, nginx, apach,docker 或自主机 在你的进程?.

    * (Side-by-side app versioning) 独立的版本,如果是基于.net core

    * 为了简单的现代web开发提供工具

    * 开发和运行在 Windows, macOS, linux 上

    * 开源 并且 关注社区的声音

    asp.net core 在nuget包中,  使用Nuget包优化你的app,只需要必须的依赖, 事实上, asp.net core 2.x  (基于.net core) 只需要单个nuget包依赖. 

    一个看上去更简单的app包含了 更严格的安全,  减少了维护 并且是 高性能的.

    使用asp.net core mvc构建 web APIs和 web UI

    asp.net mvc 提供了功能去构建APIs和apps:

    *  MVC 去帮助构建你的可测试的 api和app

    * Razor页( asp.net core 2.0起) 页面级的编程模型, 能轻易的构建ui和更高的生产力.

    * Razor标记 提供了一个更高生产力的语法给Razor页和mvc视图.

    * Tag Helpers 能在服务端代码中参与Razor文件中 创建和渲染html 元素.

    * 内置支持多数据格式和协商内容(content negotiation) 让你的api接口能取得广泛的客户端数据, 保护浏览器和移动端。

    * 模型绑定(Model binding) 自动映射数据从 http请求中到 action方法的参数

    * 模型验证 自动执行(performs) 客户端和服务端验证

    客户端开发

    asp.net core 无缝的集成了流行的客户端框架和库, 包含了Angular, React, 和 Bootstrap, 需要更多信息, 请看客户端开发.

    asp.net core 基于 .NET Framework

    asp.net core开源基于.net core 或者.net framework. asp.net core应用基于.net framework不能跨平台, 只能运行在windows上. 而且并没有计划删除对.net framework的支持.

    总来的说,asp.net core 由.net standard库组成(made up of), 应用编写在.net standard2.0 可以运行在任意支持.net standard2.0 的地方?

    基于.net core由很多优势, 各个版本都有优势 , .net core 比 .net framework 好在:

    * 跨平台 ..

    * 更好的性能

    * 独立版本支持

    * 新的api集

    * 开源

    我们很努力的减少.net core与.net framework的差异。 ‘Windows Compatibility Pack’ 做上千个windows-only的api在.net core中。 这些api不能在.net core 1.x中使用。

    ASP.NET Core is a cross-platform , hight-performance, open source framework for building modern, cloud-based, Internet-connected applications. With ASP.NET Core, you can:

    * Build web apps and Services, IoT apps, and mobile backends.

    * Use your favorite development tools on Windows, macOS, and Linux.

    * Deploy to the cloud or on-premises.

    * Run on .NET Core or .NET Framework.

     

    Why use ASP.NET Core?

    Millions of developers have used(and continue to use) ASP.NET 4.x to create web apps. ASP.NET Core is a redesign of ASP.NET 4.x, with architechural change that result in a leaner, more modular framework.

     

    ASP.NET Core providers the following benefits:

    * A unified story for building web UI and web APIs.

    * Intergration of modern, client-side frameworks and development workflows.

    * A cloud-ready, environment-based configuration system.

    * Built-in dependency injection.

    * A lightweight, high-performance, and modular HTTP request pipeline.

    * Ability to host on IIS, Nginx, Apache, Docker, or self-host in your own process.

    * Side-by-side app versioning when targeting .NET Core.

    * Tooling that simplifies modrn web development.

    * Ability to build and run on Windows, macOS, and Linux.

    * Open-source and community-focuesd.

     

    ASP.NET Core ship entirely as Nuget packages. Using NuGet packages allow you to optimize you app to include only the necessary dependencies. In fact, ASP.NET Core 2.X apps targeting .NET Core only require a single NuGet package. The benefits of a smaller app surface area include tighter security, reduced servicing, and improved performance.

     

    Build web APIs and web UI using ASP.NET Core MVC

    ASP.NET Core MVC provides features to build web APIs and web apps:

    * The Model-View-Controller(MVC) pattern helps make your web APIs and web apps testable.

    * Razor Pages(new in ASP.NET Core 2.0) is a page-based programing model that makes building web UI easier and more productive.

    * Razor markup provides a rpoductive syntax for Razor Pages and MVC views.

    * Tag Helpers enable server-side code to participate in creating and rending HTML elements in Razor files.

    * Built-in support for multiple data formats and content negotiation lets you web APIs reach a broad range of clients, including browsers and mobile devices.

    * Model binding automatically maps data from HTTP requests to action method parameters.

    * Model validation automatically performs client- and server-side validation.

     

     Client-Side development

    ASP.NET Core integrates seamlessly with popular client-side frameworks and libraries, including Angular, React, and Bootstrap. For more information, see Client-side development.

     

    ASP.NET Core targeting .NET Framework

    ASP.NET Core can target .NET Core or .NET Framework. ASP.NET Core apps targeting .NET Framework aren't corss-platform they run on Windows only. There are no plans to remove support for targeting .NET framework in ASP.NET Core. Generally, ASP.NET Core is made up of .NET Standard libraries. APPs written .NET Standard 2.0 run anywhere that .NET Standard 2.0 is supported.

     

    There are several advantages to targeting .NET Core, and thses advantages increase with each release. Some advantages of .NET Core over .NET Framwork include:

    * Coress-platform. Runs on macOS, Linux, and Windows.

    * Improved performance

    * Side-by-side versioning

    * New APIs

    * Open source

     

    We're woking hard to close the API gap from .NET Framework to .NET Core. The Windows Compatiblility Pack made thousands of Windows-only APIs available in .NET core. These weren't available in .NET Core 1.x.

  • 相关阅读:
    改进动物园
    异常动手脑总结
    代码大全2 阅读笔记
    抽象和接口
    Appium+python自动化2-启动百度app
    Appium+python自动化1-环境搭建
    python之图像识别
    python之栈和队列
    python之语音识别(speech模块)
    使用Python计算IP、TCP、UDP校验和
  • 原文地址:https://www.cnblogs.com/chinaniit/p/9644138.html
Copyright © 2011-2022 走看看