Which should I use, Blazor WebAssembly or Blazor Server?

Laurent Guigon 311 Reputation points
2023-12-06T15:19:46.75+00:00

I'm trying to decide which option to choose. I plan to develop two applications using Blazor. The first one is intended to be a wiki-type application. The second one is an online manager for the Palladium RPG (specifically for Macross/Robotech RPG), involving player sheet management and combat management. The Palladium combat system can be quite challenging, so I'd like to focus on combat narration and have the application handle the entire combat process.

For both applications, I intend to utilize the API backend supported by Blazor WebAssembly/Blazor Server app. Perhaps in the future, I might develop the frontend using Angular, React, or another JavaScript-based framework.

I aim to employ the embedded user management system that allows me to utilize AspNetUser, AspNetRole, etc., and page scaffolding. However, Duende doesn't fit my requirements (it's too expensive!). I am considering deploying my apps on Azure. Initially, my wiki will be hosted on a local machine as a server (IIS server) and won't be available on the internet (I plan to sell my book before making the wiki available online for readers). At the moment, it functions as a database for my personal use.
For my RPG app, I would like to implement a real-time refresh system. Essentially, when a player engages in a fight with an adversary, such as the adversary firing missiles at the player's mecha and causing damage, it would be beneficial if the player's character sheet updated in real-time. I envision a system akin to instant messaging platforms like Messenger, WhatsApp, Hangouts, etc., allowing for immediate updates and synchronization during the gameplay.

The main question for now is Blazor WebAssembly or Blazor Server app. If you have any tips for my future development, I would appreciate them!

Developer technologies | .NET | Blazor
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
    2023-12-06T17:14:25.74+00:00

    Blazor server hosts the client app instance on a dedicated thread on the server (one thread per client connection). a small js app runs in the browser that opens a signal/r connection to the server app. it sends events to the server app via this connection. the server app sends html updates to the js app also via the connection, which renders the dom updates.

    Blazor WASM is a Blazor app hosted in the browser. Other than initial download, no server connection is required. It still uses js to update the browser, but its a local message.

    Blazor server can make any api calls supported by the server (database, O/S, etc). Blazor WASM can use any api available to browser js (as can Blazor server via interop, but there is a network hop).

    Blazor server requires a persistent connection to the server. Blazor WASM can run offline.

    Blazor server UI performance depends on network latency. The UI events and updates are in the riser, the blazor code is on the server. You would not want to do mouse tracking for instance.

    Blazor WASM main performance hit is the initial app load.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.