« Blazor » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 29 : | Ligne 29 : | ||
Components are executed on the server. UI updates, event handling, and JavaScript calls are handled over a SignalR connection using the WebSockets protocol.<br> | Components are executed on the server. UI updates, event handling, and JavaScript calls are handled over a SignalR connection using the WebSockets protocol.<br> | ||
On the client, the Blazor script establishes the SignalR connection with the server.<br> | On the client, the Blazor script establishes the SignalR connection with the server.<br> | ||
The state on the server associated with each connected client is called a circuit. | The state on the server associated with each connected client is called a circuit.<br> | ||
Circuits aren't tied to a specific network connection and can tolerate temporary network interruptions and attempts by the client to reconnect to the server when the connection is lost. | |||
= [https://www.c-sharpcorner.com/article/blazor-server-vs-blazor-webassembly-pros-and-cons-of-each-approach/ Blazor Server Pros / Cons] = | = [https://www.c-sharpcorner.com/article/blazor-server-vs-blazor-webassembly-pros-and-cons-of-each-approach/ Blazor Server Pros / Cons] = |
Version du 26 octobre 2023 à 21:11
Liens
- Introduction to ASP.NET Core Blazor
- How to implement JavaScript Interop in Blazor
- How to create an application using Blazor and Entity Framework Core
- ASP.NET Core Blazor CRUD using Entity Framework and Web API
Description
- Développement frontend avec C#
- Intégration des bibliothèques .NET existantes (nuget)
|
Hosting models
Hosting model | Description |
---|---|
Blazor Server | run components server-side. UI updates, event handling, and JavaScript calls are handled over a SignalR connection using the WebSockets protocol. |
Blazor WebAssembly | runs components client-side in the browser on a WebAssembly. |
Blazor Hybrid | native client (MAUI, WPF) which renders web UI to an embedded Web View control. |
Blazor Server description
Components are executed on the server. UI updates, event handling, and JavaScript calls are handled over a SignalR connection using the WebSockets protocol.
On the client, the Blazor script establishes the SignalR connection with the server.
The state on the server associated with each connected client is called a circuit.
Circuits aren't tied to a specific network connection and can tolerate temporary network interruptions and attempts by the client to reconnect to the server when the connection is lost.
Blazor Server Pros / Cons
- .NET-based web framework that uses the C# and Razor languages.
- easy integration of Javascript libraries with JSInterop.
- scaling apps with many users requires server resources to handle multiple client connections and client state.