We all know that the Blazor framework is a client-side web framework. But is it possible to run a Blazor application separate from a UI thread? The latest version 0.5.0 of Blazor gives us the flexibility to run Blazor in a separate process from the rendering process. We are going to explore server-side Blazor in this article.

Since Blazor is a client-side web framework, therefore, the component logic and DOM interaction, both happen in the same process.

However, the design of the Blazor framework is smart and flexible enough to run the application separate from the rendering process. For example, we can run Blazor in a web worker thread separately from UI thread.

In this scenario, the UI thread will push the events to the Blazor worker thread and Blazor would push UI updates to the UI thread as needed. Although Blazor does not support this functionality yet, the Blazor framework is designed to handle such scenarios and is expected to support it in future releases.

Starting from Blazor 0.5.0, we can run Blazor applications on the server. It means that we can run Blazor component server-side on .NET Core while other functionalities such as UI updates, event handling, and Javascript interop calls are handled by a SignalR connection over the network. The .NET part runs under CoreCLR instead of WebAssembly which provides us access to the complete .NET ecosystem, debugging, JIT compilation, etc. This adds extensibility to the Blazor framework as the server-side Blazor uses the same component model as running a client-side Blazor app.

Let us create our first server-side Blazor app and explore it to get a better understanding of this new feature.

Prerequisites