Why Blazor?

I’m a developer who loves the C# programming language; I always wanted to be able to use the same language at the front-end and was jealous of the people who were using JavaScript for both front-end and back-end. Now, We can say that .Net stack has its front-end framework, and it’s a good one.

At first, I hesitated even to pay attention when I heard about Blazor for the first time. Guess why? What do you remember when you hear about Microsoft coming up with a new front-end framework? Right! Silverlight. And we all know what happened to the Silverlight, but when I studied farther, I got convinced that Blazor is not like Silverlight, and it won’t go away that easy, and that was when I became more interested in this framework.

Why Use Blazor Over Angular, React, and Vue

I would say there are valid reasons to use Blazor over other existing frameworks, like:

  • If you have a team of .Net developers already working on your product, the learning curve will be shallow and faster in comparison to other frameworks.
  • When you are using a .Net stack, you have a lot of great tools that will be available to you if you use Blazor. Like, Visual Studio and Nuget packages.
  • Most enterprises are in partnership with Microsoft, and that can be an advantage for Blazor.
  • You can share code between front-end and back-end, and this is my favorite part. Imagine you can create a Class, and you can use the same class in your front-end code.
  • Blazer is using WebAssembly instead of JavaScript, and that can be faster in the processor-intensive applications.

Blazor is SEO Friendly

If you are working on a project that needs to be SEO friendly, you will need to think upfront and make sure you are using the right approach. I had a bad experience when I was working on a project using React.js, and it was not fun restructure everything midway. I will not claim it will be so easy in Blazor, but it looks less hassle to me than the React experience I had. Maybe, it’s because I have more experience with .Net stack. If you want to know how that happens in Blazor, I would recommend reading this article.

What is WebAssembly?

WebAssembly is an open standard by W3C, designed to let high-level programming languages to run on browsers, and it runs near to the native speed. As you can see in the following image, it has almost all browser supports. Of course, except IE.

You can find the latest here

Why Blazor Will Not be Another Silverlight?

As I mentioned, Blazor uses WebAssembly, and that is a standard supported by all modern browsers. But, Silverlight was a plugin that was required to be installed before the client could even use the website. That is a considerable difference because Blazor will not be the only framework that is going to use WebAssembly, and there will be other contributors. We can say Microsoft took the right step for the first time regarding a front-end framework, and I’m personally very excited and hopeful that Blazor is here to stay.

Blazor WebAssembly Vs. Blazor Server

You can host your Blazor project in two ways. Client-side which is known as Blazor WebAssembly, and server-side, which is called Blazor Server. The good news is that all of your components and pages’ code will be the same for both options, and the only difference is the way you set up the project. There are differences in how the project is being loaded and rendered, which I will discuss in another article. You have the option to go with either one of them, or even change it very quickly whenever you decided to go with the other approach.

Conclusion

I believe Microsoft engineers have outstanding experience in designing programming languages and frameworks. Learning and working with Blazer was very fast and full of joy for me. I hope others will give it a try and enjoy it as well.