« Blazor » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
Aucun résumé des modifications
Ligne 13 : Ligne 13 :
* Pas de debug avec VScode
* Pas de debug avec VScode
* Ne recharge pas la page lors de modification, il faut relancer le serveur.}}
* Ne recharge pas la page lors de modification, il faut relancer le serveur.}}
= [https://learn.microsoft.com/en-us/aspnet/core/blazor/hosting-models Hosting models] =
* 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.


= [https://learn.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-7.0#blazor-server Blazor Server description] =
= [https://learn.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-7.0#blazor-server Blazor Server description] =

Version du 26 octobre 2023 à 21:09

Liens

Description

  • Développement frontend avec C#
  • Intégration des bibliothèques .NET existantes (nuget)
  • Pas de debug avec VScode
  • Ne recharge pas la page lors de modification, il faut relancer le serveur.

Hosting models

  • 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.

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.