Is Blazor Framework the Future of .NET Web Development?

Is Blazor the Future of .NET Web Development

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).

Code in WebAssembly Studio

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 technical issues around delivering Blazor as a full product required nine experimental releases before it was ready for the mainstream. Microsoft thinks that it is ready to take its next step—once an experimental technology that some believe will save .NET Web coders from “the curse of JavaScript,” has been released by Microsoft in its first public preview.

Community excited for Blazor Launch

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:

  1. Routing
  2. Layouts
  3. Forms and validation
  4. Dependency injection
  5. JavaScript interop
  6. 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.

New ASP .NET Core Web Application

Re-Use Code and Libraries Effectively

Blazor allows you to build interactive web UIs using C# instead of JavaScript. Both client and server code is written in C#, allowing you to share code and libraries.

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.

Final Thoughts

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.

Call to Action

Akash Lomas

About the Author

Akash is a Technical Architect with an extensive experience in MS stack. He is passionate about architecting solutions, coding and enhancing process delivery. He envisages a foolproof solution and holds no bar in achieving his goals. Besides, he is a loving father and is very fond of spending time with his son. He believes in keeping the child alive within himself.

Leave a Comment