Blazor
By Microsoft
NET instead of JavaScript.
Definition
Blazor is a Microsoft web framework, part of ASP.NET Core, that lets developers build interactive web user interfaces using C# and .NET instead of JavaScript.
Overview
Blazor applications are built from reusable components defined in .razor files that mix C# logic with HTML-like markup, similar in concept to how component-based frontend frameworks like React structure UI. Blazor supports multiple hosting models: Blazor Server keeps the app's logic running on the server and streams UI updates to the browser over a real-time SignalR connection, while Blazor WebAssembly compiles and runs a .NET runtime directly inside the browser via WebAssembly, so C# code executes client-side without a constant server connection. Blazor was introduced as part of ASP.NET Core and has matured across successive .NET releases, with .NET 8 adding hybrid "render modes" that let a single application mix server-rendered and client-rendered components as needed. Its key appeal is letting teams standardized on .NET and C# share code, models, and validation logic between backend and frontend, avoiding the need to maintain a separate JavaScript-based frontend stack like one built with TypeScript or Next.js.
Key Features
- C#/.NET used for both frontend and backend development
- Blazor Server (SignalR-based) and Blazor WebAssembly hosting models
- Component-based architecture using .razor files
- Two-way data binding between components and state
- Built-in dependency injection
- Code and library sharing between client and server via .NET
- Hybrid render modes (from .NET 8) mixing server and client rendering
- JavaScript interop for cases requiring existing JS libraries