Blazor is a fast-developing framework that has introduced a next generation component model that allows developers to write Single Page Applications (SPA) without JavaScript.
The framework is built on .NET that runs in the browser via WebAssembly and is based on HTML, CSS and other standard web technologies. If Blazor sounds new to you, that’s because it has only been in development since 2018, initially as an experimental project.
The Blazor framework targets the Mono WebAssembly runtime (the .NET runtime compiled to Web Assembly (WASM)), thus allowing .NET to run on the client’s browser inspiring the name “Blazor” (Browser + Razor). In this configuration the application’s resources including .dll files are delivered to the client and executed on the Mono WebAssembly runtime. This makes the JavaScript to C# transition possible.
Blazor has two separate execution modes with the biggest difference being the way the application is deployed. The first one is called Client-side (WASM) and does what the previous paragraph described—this is the new and innovative concept for C# in the browser and it’s what Blazor is all about. Blazor’s other execution mode is called Server-side Blazor and in this configuration, Blazor operates more closely to how previous ASP.NET technologies worked. This mode is great for compatibility with existing applications.
Let’s review the benefits of execution methods in Blazor below.
The Blazor Server hosting model offers:
Smaller payload size with fast initial load time (compared to Blazor WebAssembly).
Complete .NET API compatibility.
Blazor Server apps have direct access to server and network resources where the app is executing.
Support for thin clients—Blazor Server apps work with browsers that don't support WebAssembly and on resource-constrained devices.
Near native execution speed—Blazor Server apps generally execute on the server quickly. However, they are usually slower than other types of apps that execute natively on the client.
The Blazor WASM hosting model offers:
Run Blazor apps offline once downloaded—Blazor WebAssembly apps built as Progressive Web Apps (PWAs) can run offline (for example when when clients aren't able to connect to the Internet)
Static site hosting - Blazor WebAssembly apps are downloaded to clients as a set of static files (no server is required to execute server-side code in order to download and run)
Offloads processing to clients (apps are executed on the clients)
Telerik UI for Blazor is the industry-leading library with 110+ Blazor components for developers who need to build a modern, professional, consistent user experience for web applications, including enterprise ones. For more information about Blazor check out our Blazor documentation.
Discover More About Telerik UI for Blazor
Visit the Telerik UI for Blazor page to discover detailed information, features, and benefits