Asp.net Core介绍

简介:

ASP.NET Core is a significant redesign of ASP.NET. This topic introduces the new concepts in ASP.NET Core and explains how they help you develop modern web apps.

Asp.net Core是重新设计过得新一代Asp.Net。此篇文章介绍Asp.net Core 如何帮助你开发先进的web应用。

What is ASP.NET Core?

什么是Asp.net Core

ASP.NET Core is a new open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends. ASP.NET Core apps can run on .NET Core or on the full .NET Framework. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac and Linux. ASP.NET Core is open source at GitHub.

Asp.Net Core 是一个新的、开源的、跨平台的开发框架,为了更好的构建基于云网络的先进应用,比如web app、IoT(物联网) app和移动后端。Asp.net Core应用能够运行在.Net Core或者.Net Framework环境下。这种新架构为应用部署到云或者本地提供了高性能开发框架。它是由模块化组件构成,这样你就能很灵活的构建自己的解决方案。你可以在Windows、Mac和Linux下开发和运行你的Asp.net Core 应用。Asp.Net Core在GitHub上已经开源。

Why build ASP.NET Core?

为什么构建Asp.Net Core?

The first preview release of ASP.NET came out almost 15 years ago as part of the .NET Framework. Since then millions of developers have used it to build and run great web apps, and over the years we have added and evolved many capabilities to it.

作为.Net框架的一部分,Asp.Net从第一个预览版到现在已经过去15年了。数以百万计的开发者使用它开发和运行优秀的web app,这么多年来我们也不断的升级和添加更多的功能。

ASP.NET Core has a number of architectural changes that result in a much leaner and modular framework. ASP.NET Core is no longer based on System.Web.dll. It is based on a set of granular and well factored NuGet packages. This allows you to optimize your app to include just the NuGet packages you need. The benefits of a smaller app surface area include tighter security, reduced servicing, improved performance, and decreased costs in a pay-for-what-you-use model.

Asp.Net Core从架构上有很多的改变,这些改变从而使它成为一个灵活性和模块化的框架。Asp.Net Core 不再基于System.Web.dll。它是基于颗粒状和分解的NuGet 包。这使你可以优化你的应用程序仅仅包含所需的 NuGet 包。这种pay-for-what-you-use(按需使用)模式的好处包括加强安全、减少维护、提高性能和降低成本。

With ASP.NET Core you gain the following foundational improvements:

使用Asp.net Core你将获得以下改进的功能:

  • A unified story for building web UI and web APIs

  • web UI和web Apis使用统一的库

  • Integration of modern client-side frameworks and development workflows

  • 现代客户端框架和开发工作流的集合

  • A cloud-ready environment-based configuration system

  • 一个适合云计算环境的配置系统

  • Built-in dependency injection

  • 内置的依赖注入

  • New light-weight and modular HTTP request pipeline

  • 全新的轻量级和模块化HTTP请求管道

  • Ability to host on IIS or self-host in your own process

  • 在自己的进程中运行IIS或者Self-host的能力

  • Built on .NET Core, which supports true side-by-side app versioning

  • 以.Net Core为基础,支持真正的多应用版本管理

  • Ships entirely as NuGet packages

  • 完全使用NuGet包管理

  • New tooling that simplifies modern web development

  • 新的简化的现代化web开发工具

  • Build and run cross-platform ASP.NET apps on Windows, Mac and Linux

  • 在Windows,Mac和Linux下构造和运行多平台的Asp.Net的应用

  • Open source and community focused

  • 开源社区共同管理

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

在Asp.Net Core MVC中构建Web UI和Web APIs

  • You can create well-factored and testable web apps that follow the Model-View-Controller (MVC) pattern. See MVC and Testing.

  • 你能创建一个遵循MVC模式的可分解和可测试的Web应用。详见 MVC 和 Testing。

  • You can build HTTP services that support multiple formats and have full support for content negotiation. See Formatting Response Data

  • 你可以构建支持多格式和完全支持内容协议的HTTP服务。详见 Formatting Response Data。

  • Razor provides a productive language to create Views

  • Razor 提供了一种创建视图的高效语言。

  • Tag Helpers enable server-side code to participate in creating and rendering HTML elements in Razor files

  • 在Razor文件中,标签助手使服务器端代码参与创建和渲染Html元素成为可能。

  • You can create HTTP services with full support for content negotiation using custom or built-in formatters (JSON, XML)

  • 你可以创建完全支持使用自定义或者内置格式化(Json,Xml)内容协商的Http服务。

  • Model Binding automatically maps data from HTTP requests to action method parameters

  • 自动的从Http请求中的action方法参数中映射数据进行模型绑定。

  • Model Validation automatically performs client and server side validation

  • 自动执行前端和服务端的模型验证。

Client-side development

前端开发

ASP.NET Core is designed to integrate seamlessly with a variety of client-side frameworks, including AngularJS, KnockoutJSandBootstrap. See Client-Side Development for more details.

Asp.Net Core的核心目的是为了和各式各样的前端框架无缝连接,包括了AngularJS,KnockoutJS和Bootstrap。详见Client-side Development。



本文转自 sshpp 51CTO博客,原文链接:http://blog.51cto.com/12902932/1949436,如需转载请自行联系原作者

相关文章
|
16天前
|
数据可视化 网络协议 C#
C#/.NET/.NET Core优秀项目和框架2024年3月简报
公众号每月定期推广和分享的C#/.NET/.NET Core优秀项目和框架(每周至少会推荐两个优秀的项目和框架当然节假日除外),公众号推文中有项目和框架的介绍、功能特点、使用方式以及部分功能截图等(打不开或者打开GitHub很慢的同学可以优先查看公众号推文,文末一定会附带项目和框架源码地址)。注意:排名不分先后,都是十分优秀的开源项目和框架,每周定期更新分享(欢迎关注公众号:追逐时光者,第一时间获取每周精选分享资讯🔔)。
|
3月前
|
开发框架 前端开发 JavaScript
盘点72个ASP.NET Core源码Net爱好者不容错过
盘点72个ASP.NET Core源码Net爱好者不容错过
71 0
|
3月前
|
开发框架 .NET
ASP.NET Core NET7 增加session的方法
ASP.NET Core NET7 增加session的方法
37 0
|
3月前
|
开发框架 JavaScript .NET
ASP.NET Core的超级大BUG
ASP.NET Core的超级大BUG
42 0
|
3月前
|
开发框架 前端开发 .NET
ASP.NET CORE 3.1 MVC“指定的网络名不再可用\企图在不存在的网络连接上进行操作”的问题解决过程
ASP.NET CORE 3.1 MVC“指定的网络名不再可用\企图在不存在的网络连接上进行操作”的问题解决过程
41 0
|
1月前
|
开发框架 人工智能 .NET
C#/.NET/.NET Core拾遗补漏合集(持续更新)
C#/.NET/.NET Core拾遗补漏合集(持续更新)
|
1月前
|
开发框架 中间件 .NET
C# .NET面试系列七:ASP.NET Core
## 第一部分:ASP.NET Core #### 1. 如何在 controller 中注入 service? 在.NET中,在ASP.NET Core应用程序中的Controller中注入服务通常使用<u>依赖注入(Dependency Injection)</u>来实现。以下是一些步骤,说明如何在Controller中注入服务: 1、创建服务 首先,确保你已经在应用程序中注册了服务。这通常在Startup.cs文件的ConfigureServices方法中完成。例如: ```c# services.AddScoped<IMyService, MyService>(); //
63 0
|
2月前
|
开发框架 前端开发 .NET
福利来袭,.NET Core开发5大案例,30w字PDF文档大放送!!!
为了便于大家查找,特将之前开发的.Net Core相关的五大案例整理成文,共计440页,32w字,免费提供给大家,文章底部有PDF下载链接。
33 1
福利来袭,.NET Core开发5大案例,30w字PDF文档大放送!!!
|
2月前
|
算法 BI API
C#/.NET/.NET Core优秀项目和框架2024年1月简报
C#/.NET/.NET Core优秀项目和框架2024年1月简报
|
3月前
|
算法 C#
C# .Net Core bytes转换为GB/MB/KB 算法
C# .Net Core bytes转换为GB/MB/KB 算法
40 0