Blazor allows developers to create single-page applications (SPAs) using C# and .NET utilising a component-based architecture. Blazor WebAssembly is a client-side in-browser implementation of Blazor which includes a .NET runtime implemented in WebAssembly.
Running .NET code inside web browsers is made possible by WebAssembly (
wasm). WebAssembly is a compact bytecode format optimized for fast download and maximum execution speed. WebAssembly is an open web standard and supported in web browsers without plugins.
So, once the application starts, it can work in offline mode, meaning, it doesn’t require the server. Because this type of application is composed of static files.
Create a new blazor webassembly app
ASP.NET Core hosted For API
Progressive Web Application for Mobile Phones
Project structure of blazor webassembly
Menifest.json for PWA App
HttpClient to call APIs
Run the application and inspect the downloaded files
All DLLs loaded on the browser
Client-side Blazor is currently pre-compiled into intermediary language before it’s downloaded into browser and, as it development progresses, it will eventually be fully pre-compiled into WebAssembly.
1. No need for a server side
3. Offline Support
4. Progressive web app
Client-side Blazor is faster but it requires its whole environment to be downloaded, which may be quite hefty.
1. Big download size
2. Require WebAssembly
3. Debugging is not great
4. Your DLLs are downloaded