liveBook · Manning

Blazor Server

As explained in ASP.NET Core in Action, 3e

Blazor Server is a Blazor hosting model in which UI rendering and event handling execute on the server while updates are sent to the browser.

Blazor Server is a stateful, server-rendered hosting model for building interactive applications. UI rendering and event handling remain on the server, while UI events and page updates travel between server and browser over WebSockets. This gives the application a client-side single-page feel without requiring a browser-based WebAssembly application. section 1.2 section 1.6

Use Blazor Server when these characteristics fit the application:

  • Keep application state and rendering on the server while delivering interactive page updates to the browser. section 2.3
  • Choose it as an alternative to Blazor WebAssembly when server-rendered development is more suitable than running the application in the browser. section 1.2
  • Combine it with other ASP.NET Core paradigms when one application needs multiple application styles. section 1.2

Gradual migration from Web Forms

A large Web Forms application may be difficult to convert directly because conversion effectively involves rewriting the application and potentially changing design paradigms. Blazor Server offers a stateful, component-based model similar to Web Forms, allowing pages to migrate gradually to ASP.NET Core. section 2.4.3

Figure 2.5 ASP.NET Core can act as the server-side application for a variety of clients: it can serve HTML pages for traditional web applications, act as a REST API for client-side SPA applications, or act as an ad hoc RPC service for client applications.
CH02_F05_Lock3

Compare Blazor Server with ASP.NET Core applications that serve HTML pages, expose REST APIs, or provide RPC services. section 2.3

How ASP.NET Core in Action, 3e covers it

How deep it goes
Defines server rendering, statefulness, and WebSocket updates but stops short of implementation internals.
Examples
Uses gradual page-by-page migration from Web Forms as the concrete application scenario.
What you can do after
Evaluate/understand when server-rendered, stateful interaction fits better than browser-based Blazor WebAssembly.
How it connects
Connects Blazor Server with Blazor WebAssembly, ASP.NET Core, WebSockets, Web Forms, and server-rendered applications.

Also explained in

Compare how 2 books explain Blazor Server →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.