Blazor,ASP.NET Core托管与ASP.NET Core中的服务器端 [英] Blazor, ASP.NET Core Hosted vs Server Side in ASP.NET Core

查看:155
本文介绍了Blazor,ASP.NET Core托管与ASP.NET Core中的服务器端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用blazor.Net,这是一个实验性框架。

I am trying my hands on blazor.Net which is an experimental framework.

我已经在该框架中开发了一个小项目,它的功能很棒。

I already developed a small project in this Framework and its awesome.

但是在11月14日Blazor语言服务最近更新之后,我在模板选择中看到了owo选项。

But after recent update in Blazor Language Service on 14 November I Am seeing owo options in Template selection.

第一个是Blazor(托管ASP.NET Core)

First is Blazor (ASP.NET Core Hosted)

第二个是Blazor (ASP.NET Core中的服务器端)

Second is Blazor (Server Side in ASP.NET Core)

没有关于它们之间差异的信息,

There is no information about difference between them,

任何人都可以告诉我这两个模板有什么区别,什么时候应该选择哪个?

Can anybody tell me what is difference between these two templates and when should choose which one?

推荐答案

在服务器端托管模型中,Blazor在ASP.NET Core应用程序中的服务器上执行。 UI更新,事件处理和JavaScript调用通过SignalR连接进行处理。

In the server-side hosting model, Blazor is executed on the server from within an ASP.NET Core app. UI updates, event handling, and JavaScript calls are handled over a SignalR connection.

在客户端模型中,Blazor应用程序,其依赖项和.NET运行时下载到浏览器,然后直接在浏览器UI线程上执行该应用。所有UI更新和事件处理都在同一过程中进行。

In the client-side model, the Blazor app, its dependencies, and the .NET runtime are downloaded to the browser, and the app is executed directly on the browser UI thread. All UI updates and event handling happens within the same process.

Pros&缺点– 在此处了解更多信息

Pros & cons – read more here.

服务器端模型被认为发布的风险较小,因此我们将首先在asp.net 3.0中看到它。

The server side model was seen as less risky to release first so we will see it first with asp.net 3.0. Client side will come later.

警告:在获得支持的版本之前,请勿在生产代码中使用。

Warning: Do not use in Production code until we get a supported release.

这篇关于Blazor,ASP.NET Core托管与ASP.NET Core中的服务器端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆