No plugins, no add-ons, just .NET running in the browser.
It’s not just an idea, but a reality that could be a turning point for the web development world. Let’s welcome Blazor—a new breed of web application framework that runs .NET in the browser through WebAssembly.
What is WebAssembly (WASM)?
The official WebAssembly website states that:
“WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. The design of WASM is like a portable target for compilation of high-level languages like C/C++/Rust, enabling deployment on the web for client and server applications.”
We are discussing Wasm because the project Blazor would not have been possible without this brilliant piece of work. It is built on WebAssembly platform and implements a .NET runtime in the browser. It is optimized for single page web applications (SPA apps).
Introduction to Blazor
It is a free, open-source web framework to build web apps using an assortment of C#, Razor, and HTML. It makes use of the latest web standards and requires no additional plugins or add-ons to run. Think Angular/React, but it is actually C#!
This is not another Silverlight. It took birth to stay and grow strong in today’s highly competitive web development race.
Remember, .NET is absolutely free and it includes Blazor. Thus, it comes with no fees or licensing costs, including for commercial use.
Where Did Blazor Come From?
A little over a year ago Blazor took off as a personal project initiated by Steve Sanderson of Microsoft with the goal of building a client web UI framework based on .NET and WebAssembly.
Its first version was built upon an interpreted .NET CIL (Common Intermediate Language) runtime called ‘DotNetAnywhere.’ Initially, the features were limited, but its potential was obvious right away.
Unsurprisingly, .NET web developers took a fancy to Blazor immediately. The excitement and chatter made Microsoft take notice. It became an official project.
The official statement for this goes as follows:
“Blazor is no longer experimental and we are committing to ship it as a supported web UI framework…”
Exciting Features of Blazor
The GitHub site of Blazor claims that it will have all the features of a modern web framework. Some of them are:
- Forms and validation
- Dependency injection
- Server-side rendering
Let us look at some of the exciting features:
High Compatibility of Web Apps
Microsoft in an official announcement said that:
“After .NET Core 3.0 we will not port any more features from .NET Framework. If you are a Web Forms developer and want to build a new application on .NET Core, we would recommend Blazor which provides the closest programming model.”
Blazor will get integrated into ASP.NET Core and run with .NET Core. This integration will allow the same code to run on different devices without any need to change the code. This will enhance the compatibility of web apps.
Re-Use Code and Libraries Effectively
Because it is real .NET running on WebAssembly, you can re-use code and libraries from server-side parts of your application. Alternatively, it can run your client logic on the server.
A Strong Community
Blazor is an open-source framework and is a part of the .NET development platform that has a strong community of over 60,000 contributors from more than 3,700 companies. And counting…
The community has self-organized itself into a great group of people helping each other and promoting it through their experiments. Adrien Torris has done a magnificent job of collating resources in an aptly named Awesome Blazor collection.
Blazor solves real problems faced by web developers and it does so effectively and at almost no cost. Its learning curve is smooth and easy. It contains all the must-have features of a modern day SPA framework while keeping things simple. With Microsoft behind it and an excited community supporting it, Blazor is poised to make a big impact on future web development.
Blazor Development At Net Solutions
Net Solutions picked up Blazor almost a year ago when its first experimental release came out. We have done multiple projects internally to review its potential and it is indeed giving us some promising results. Now, with Microsoft’s official announcement of its release, we are looking forward to building future projects on this new framework.