.NET Core 3.0方案中的Blazor服务器和性能

什么是Blazor服务器? (What is Blazor Server?)

Blazor Server apps host Blazor components on the server and handle UI interactions over a real-time SignalR connection. As the user interacts with the app, the UI events are sent to the server over the connection to be handled by the various components that make up the app. When a component handles a UI event, it’s rendered based on its updated state. Blazor compares the newly rendered output with what was rendered previously and send the changes back to the browser and applies them to the DOM.

Blazor服务器应用程序在服务器上托管Blazor组件,并通过实时SignalR连接处理UI交互。 当用户与应用程序交互时,UI事件通过连接发送到服务器,由组成应用程序的各种组件处理。 当组件处理UI事件时,将根据其更新状态进行呈现。 Blazor将新渲染的输出与先前渲染的输出进行比较,然后将更改发送回浏览器,并将其应用于DOM。

.NET Core 3.0方案中的Blazor服务器和性能_第1张图片

Since Blazor Server apps run on .NET Core on the server, they enjoy all the benefits of running on .NET Core including great runtime performance and tooling. Blazor Server apps can leverage the full ecosystem of .NET Standard libraries without any browser imposed limitations.

由于Blazor Server应用程序在服务器上的.NET Core上运行,因此它们享受在.NET Core上运行的所有好处,包括出色的运行时性能和工具。 Blazor Server应用程序可以利用.NET Standard库的完整生态系统,而不受任何浏览器的限制。

我什么时候应该使用Blazor Server? (When should I use Blazor Server?)

Blazor Server enables you to add rich interactive UI to your .NET apps today without having to write JavaScript. If you need the interactivity of a single-page app in your .NET app, then Blazor Server is a great solution.

Blazor Server使您能够立即将丰富的交互式UI添加到.NET应用程序中而无需编写JavaScript。 如果您需要.NET应用程序中单页应用程序的交互性,那么Blazor Server是一个很好的解决方案。

Blazor Server can be used to write completely new apps or to complement existing MVC and Razor Pages apps. There’s no need to rewrite existing app logic. Blazor is designed to work together with MVC and Razor Pages, not replace them. You can continue to use MVC and Razor Pages for your server-rendering needs while using Blazor for client-side UI interactions.

Blazor Server可用于编写全新的应用程序或补充现有的MVC和Razor Pages应用程序。 无需重写现有的应用逻辑。 Blazor旨在与MVC和Razor Pages一起使用,而不是替换它们。 在使用Blazor进行客户端UI交互时,您可以继续使用MVC和Razor页面来满足服务器渲染的需求。

Blazor Server works best for scenarios where you have a reliable low-latency network connection, which is normally achieved when the client and server are geographically on the same continent. Apps that require extremely high fidelity instant updates on every tiny mouse twitch, like real-time games or drawing apps, are not a good fit for Blazor Server. Because Blazor Server apps require an active network connection, offline scenarios are not supported.

Blazor Server最适用于您具有可靠的低延迟网络连接的方案,通常,这在客户端和服务器位于同一大陆的地理位置时可以实现。 需要对每个微小的鼠标轻触进行极高保真度即时更新

你可能感兴趣的:(python,java,大数据,人工智能,机器学习)