What is Blazor

laptop

Blazor is a UI framework for creating interactive applications that can run both server-side and client-side on the .NET platform. In its development Blazor framework has been greatly influenced by modern frameworks for creating client-side applications – Angular, React, VueJS. In particular, it manifests itself in the role of components in building the user interface. At the same time, both on the client side and on the server side, C# is used as a programming language instead of JavaScript when defining the code. And standard HTML and CSS are used to describe the visual interface.

Blazor provides developers with the following advantages:

  • Writing web application code using C# instead of JavaScript
  • Leveraging the power of the .NET ecosystem, in particular the .NET libraries when building applications, security and performance of the .NET platform
  • Client and server side of the application can use common logic
  • Using Visual Studio as a development tool that has built-in templates to simplify application creation

Functionally, Blazor is currently divided into several subsystems:

Blazor Server: allows to create server applications and is supported by ASP.NET
Blazor WebAssembly: allows you to create single-page interactive client-side applications that run in the user’s browser and work using WebAssembly technology
Blazor Hybrid: allows you to create desktop and mobile applications on top of .NET MAUI technology
The first preview version of Blazor was released in March 22, 2018. The full-fledged release of Blazor Server came in September 2019 and Blazor WebAssembly in May 2020, and both of these platforms are included in .NET and can be fully utilized to build server-side applications and client-side applications. So in fact Blazor covers both server-side and client-side web application needs.