At Assemblysoft we have been developing applications with Blazor before it was officially released. Why the excitement? As .NET specialists here at Assemblysoft, Blazor is a technology that enables some amazing capabilities that we can pass onto our clients with huge cost and development time benefits.

Firstly we need to understand what Blazor is.

What is Blazor?

Blazor is a Single Page Application development framework. The name Blazor is a combination/mutation of the words Browser and Razor (the .NET HTML view generating engine). The implication being that instead of having to execute Razor views on the server in order to present HTML to the browser, Blazor is capable of executing these views on the client.

Browser + Razor == Blazor

Blazor lets you build interactive web UIs using C# instead of JavaScript. Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Both client and server code is written in C#, allowing you to share code and libraries.

Blazor is a feature of ASP.NET, the popular web development framework that extends the .NET developer platform with tools and libraries for building web apps.

What Blazor is not

Blazor is not like Silverlight, Microsoft’s previous attempt at hosting in-browser applications. Silverlight required a browser plugin in order to run on the client, which prevented it from running on iOS devices.

Blazor does not require any kind of plugin installed on the client in order to execute inside a browser. Blazor either runs server-side, in which case it executes on a server and the browser acts like a dumb terminal, or it runs in the browser itself by utilising WebAssembly.

Because WebAssembly is a web standard, it is supported on all major browsers, which means also client-side Blazor apps will run inside a browser on Windows/Linux/Mac/Android and iOS.

Built on open web standards

Blazor uses open web standards without plug-ins or code transpilation. Blazor works in all modern web browsers, including mobile browsers.

Code running in the browser executes in the same security sandbox as JavaScript frameworks. Blazor code executing on the server has the flexibility to do anything you would normally do on the server, such as connecting directly to a database.

Share code and libraries

Blazor apps can use existing .NET libraries, thanks to .NET Standard—a formal specification of .NET APIs that are common across all .NET implementations.

.NET Standard allows the same code and libraries to be used on the server, in the browser, or anywhere you write .NET code.

Read more about code sharing with Blazor

JavaScript interop

Your C# code can easily call JavaScript APIs and libraries. You can continue to use the large ecosystem of JavaScript libraries that exist for client side UI while writing your logic in C#.

When using server-side code execution, Blazor takes care of seamlessly executing any JavaScript code on the client.

Learn about JavaScript interop

Run on WebAssembly or the server

Blazor can run your client-side C# code directly in the browser, using WebAssembly. Because it's real .NET running on WebAssembly, you can re-use code and libraries from server-side parts of your application.

Alternatively, Blazor can run your client logic on the server. Client UI events are sent back to the server using SignalR - a real-time messaging framework. Once execution completes, the required UI changes are sent to the client and merged into the DOM.

Share code and libraries

Blazor apps can use existing .NET libraries, thanks to .NET Standard—a formal specification of .NET APIs that are common across all .NET implementations.

.NET Standard allows the same code and libraries to be used on the server, in the browser, or anywhere you write .NET code.

UI component ecosystem

Get productive fast with re-usable UI components from top component vendors like Telerik, DevExpress, Syncfusion, Radzen, Infragistics, GrapeCity, jQWidgets, and others.

Free tools for every operating system

Visual Studio and Visual Studio Code provide a great Blazor development experience on Windows, Linux, and macOS.

If you prefer to use a different editor, there are .NET command-line tools that allow you to work with the editor of your choice.

Explore tools for .NET