Blazor
02 / 02

Server vs. WebAssembly, Hybrid & Choosing Blazor

Server vs. WebAssembly, Hybrid & Choosing Blazor

Blazor Server vs. Blazor WebAssembly

Server: C# runs on the server, UI updates streamed to the browser over a persistent SignalR connection — fast initial load, but requires a constant connection (an interruption breaks interactivity) and the server maintains per-client state, a real scaling consideration with many concurrent users. WebAssembly: the app compiles to WASM and runs directly in the browser — no persistent connection needed once loaded, but a slower initial load (downloading the compiled app + .NET runtime) and runs within browser resource limits, not server compute.

Prerendering & Blazor Hybrid

Prerendering has the server render initial HTML before the WebAssembly app finishes loading, giving users something immediate rather than a blank page — the app then hydrates and takes over interactivity. Blazor Hybrid runs the same component code inside a native desktop/mobile app's embedded WebView, reusing UI logic across web and native shells. Newer unified rendering modes let a single app mix server/WASM/static rendering per-component rather than committing the whole app to one model.

The WebAssembly Foundation

WebAssembly is the browser-native, near-native-speed binary format (not JavaScript) that makes running compiled .NET code directly in a standard, unmodified browser technically possible at all.

JS Interop & When to Choose Blazor

JavaScript interop lets Blazor call into existing JS libraries/browser APIs without a C# equivalent — the ecosystem escape hatch. Blazor's sweet spot: teams already invested in .NET (existing backend, existing skillset), especially for internal enterprise apps with a controlled network environment. Teams needing the broader, more mature JavaScript frontend ecosystem's libraries/hiring pool may reasonably prefer React/Vue/Angular instead — a real stack-consistency-vs-ecosystem-maturity tradeoff, not a universally correct choice either way.

Keep your own version of these notes — editable, searchable, and organised by your stack.

Start free