Table of Content
- 1. What is Blazor?
- 2. Why should I choose Blazor?
- 3. What are the hosting models of Blazor?
- 4. It is very early in its life cycle, with a lot of significant code churn
- 5. It is absolutely on the right track
- 6. It is the future in C# Web App Development, quite possibly
- 8. It only makes sense if you are familiar with C#
- 9. It took off as an individual task depending on .NET and WebAssembly
- 10. Quite possible because of features and various Hosting Models
- 11. May be if you focus on offline support
- 12. Conclusion
What is Blazor?
Blazor is a single-page application framework whose main purpose is to execute Razor views on the client-side rather than having to execute them on the server to present HTML to the browser. The idea of Blazor basically resides on the combination of Browser and Razor.
Why should I choose Blazor?
Blazor enables you to run your apps on any browser because of WebAssembly (WASM). Blazor does not require any add-ons or plugins for execution which is the case in Silverlight. To develop apps, Blazor utilizes a strongly typed object-oriented programming language called C#. And this allows us to catch errors during compile time.
Being a part of .NET CORE 3, Blazor can utilize all the libraries and public NuGet packages supported on the .NET platform.
Here are a few reasons why one should go with Blazor –
- WASM (Web Assembly) support in all browsers
- Code reusability
- Existing libraries can be reused
- Debugging and Tooling
- Native performance
Using different renderers, Blazor can efficiently create mobile as well as web-based user interfaces.
What are the hosting models of Blazor?
Talking about the hosting model, the Blazor framework has two i.e., Server-side blazor and Web Assembly.
WASM allows applications to run on a browser and for this to happen, it downloads everything like HTML, CSS, images, assemblies, and even complete .NET runtime which is then converted to WASM bytecode. Because of all these, it doesn’t need a server connection, what it needs is just to load into the browser, that’s it.
Here are a few advantages of WebAssembly –
- Offline support for the Application
- No need for a server, what it needs is just resource processing at the client’s device.
- Seamless execution support in all modern browsers with faster performance.
- No Add-ons or plugins required.
Let’s have a look at the disadvantages of WebAssembly –
- It is limited to browser capabilities.
- Downloads everything including .NET runtime
- Might take longer load times because of increased downloads.
- Problems with outdated or traditional browsers.
When the app is running, the browser communicates with the Blazor server application through the help of a SignalR connection.
Here are a few advantages of Server-side blazor –
- Less need of downloading
- It runs faster
- Server-side keys are safe to use.
- No need for WASM.
Let’s have a look at the disadvantages of Server-side blazor –
- No offline support
- Requires a specific server or environment to execute on Asp.Net Core.
- High latency
- Scalability can be a challenge
In this blog, we will learn whether Blazor can be the future in web app development.
It is very early in its life cycle, with a lot of significant code churn
"I think that Blazor is very early in its life cycle, with a lot of significant code churn. With this in mind, there are a lot of potential performance issues you may need to think about solving or working around with it. It has not had enough tested deployments, so these smaller problems are going to be there in the many, rather than the few. Its single app framework competes against MVC and Razor pages, but until it can have some good tests and some further development into its life cycle, it is too early to tell if it will be a success or not.”
- Alex Magnin, CEO and Founder of Alexmagnin.com
It is absolutely on the right track
"In my opinion, Blazor is absolutely on the right track. It's taking a lot of great cues from React in terms of the architecture and if you're an experienced React developer, you're going to recognize the patterns right away and be able to start running.
However, it suffers from a few small issues such as the way they're managing state is not ideas (using [CascadingParameter]) and something like a Redux framework built in would make things simpler.
Overall, it's a good start, but definitely requires some attention from Microsoft. However, Microsoft's MVC and Entity Frameworks suffered the same sorts of issues in version 1 and have spawned into what I would consider the best frameworks for designing APIs out there.”
- Tyler Findlay from TyFi Consulting Inc.
It is the future in C# Web App Development, quite possibly"Is Blazor the future in Web App Development? No. Is Blazor the future in C# Web App Development, quite possibly.
All popular languages can be compiled to web assembly today.
It is very likely that Blazor will be the dominant web assembly framework in the C# space, given it's support by Microsoft.”
- Austin King, Sr. Full Stack Developer at OpsDrill.com
- Ethel Favors, Content Curator at RankSoldier International Private Limited
Looking to Dedicated ASP.Net Developer ?
It only makes sense if you are familiar with C#
If you are already familiar and working with C#, Blazor is super interesting as it runs WebAssembly. But on the other hand, other languages can also handle this, so it only makes sense if you are familiar with C#.”
- Andreas Pettersson, CTO of Right People Group
It took off as an individual task depending on .NET and WebAssembly
"Barely a year prior Blazor took off as an individual task started by Steve Sanderson of Microsoft to fabricate a customer web UI system dependent on .NET and WebAssembly. .NET web developers liked Blazor right away. The energy and gab made Microsoft pay heed. It turned into an authority project.
- Blazor is an open-source structure and is a piece of the .NET improvement stage that has a solid local area of more than 71264 benefactors from more than 2500 organizations.
- Net Solutions got Blazor right around a year prior when its first trial discharge came out. Presently, with Microsoft's true declaration of its delivery, we are anticipating building future tasks on this new structure.”
- Christian Velitchkov, Co-Founder of Twiz LLC
Quite possible because of features and various Hosting Models
It has the support for so many exciting and improved features such as –
- Forms and validations
- Authentication support
- Server-side rendering
- Dependency injection
- High compatibility for web application
- Libraries and Code reusability
- A strong community that solves concerns
- signalR without JS
- Lazy loading, gRPC, and many more.
Talking about the hosting models, Blazor has support for four hosting models that weigh its popularity.
- Blazor Server and Blazor WASM for web platform
- Mobile Blazor Binding renderer for Android and iOS platforms
- Blazor Electron for desktops such as Linux, Windows, and Mac.
Because of multiple renderers, Blazor can efficiently develop web-based components and native mobile UIs.
May be if you focus on offline support
Blazor has been impressive for many reasons like performance, hosting models, features, compatibility, etc. With Blazor you can seamlessly build Progressive Web Apps or client-side applications that can run even in offline mode. To make this possible, blazor utilizes modern web standards in addition to the service workers whose main purpose is to cache the files. Hence when you simply turn off the internet and type the app URL in the browser, these apps would work flawlessly. With this, you will benefit with faster performance and responsiveness of an application.