Introduction
This is part two of the “Blazor: Zero to Hero” article series. Before getting into the Part II article series, let’s have a Glimpse at Part I,
- Blazor is a framework to build Interactive Web UIs using C# and HTML.
- The initial release was in 2018 by Microsoft.
- We can use C# code in the Client-Side programming, and WebAssembly will handle browsers to understand the C# code.
- We need .NET CORE SDK 3.1 or latest
- Visual Studio 2017 or the latest can be used as the IDEs.
Please visit, Blazor: Zero To Hero – Part 1 for more details on Part I
In this article, we will have a detailed look at the Road Map of Blazor, WebAssembly, Hosting Models
Road Map of Blazor
Microsoft is working quite long on this technology, in 2018 they showcased Blazor as a new platform and it was at an experimental stage, and the response was very positive. As a result, in April 2019, Microsoft confirmed they are shipping the product and they launched the preview. .NET Core 3.0 was launched in the year 2019 September, and along with this release the first official Blazor was also released, and this is was however Server-Side Blazor. In May 2020, the Client-Side Blazor was officially released. And later, Blazor will be launched with other platforms such as Desktop applications, Mobile Applications.
WebAssembly
An Open standard that defines portable binary code formate for executable programs.
Hosting Models
There are two different flavours of Blazor,
- Client-Side
- Server-Side
These two are the two different ways of hosting a Blazor application.
Client-Side
The Client-Side hosting model is also known as Blazor WebAssembly, the application runs directly in the browser on WebAssembly, and all required is the Complied Application, DOT NET Runtime, and Dependencies are downloaded to the Client from the Server.
The client-side Blazor can run without connecting to the Server on the browser or optionally we can configure our application to the server using SignalR or WebAPIs.
Pros and Cons of Client-Side Hosting
Let’s have a look at both Pros and Cons of Blazor WebAssembly,
Pros
- Since the application run’s on the browser, an active connection is not required.
- we can host the application on our own server on the internet somewhere, in the cloud, on Azure as a static website, or even on a CDN Content Delivery Network.
Cons
- The very first request takes a longer time as the entire app since the dependencies need to be downloaded.
- It is restricted to the capabilities of the browser.
Server Side Hosting
With this hosting model, the application is executed on the server. Between the client and the server, a SignalR connection is established.

Pros and Cons of Server Side Hosting
Let’s have a look at Pros and Cons
Pros
- The app loads much faster since there is no need to load for WebAssembly.
- Since the app runs on the server, it can take full advantage of server capabilities, including the use of any .NET Core compatible APIs.
- All the client needs, to use the app is a browser. Even browsers that don’t support WebAssembly can be used.
Cons
- ASP.NET Core server is required to host the application.
- An active connection to the server is always required.
- If the server is down, the application stops working.
- Scalability can be Challenged.
Conclusion
In this article, we had a detailed look at the WebAssembly and Hosting model, and I have tried to explain it as simple as I could. Please feel free to share your valuable feedback in the comment section. In the next article, we will start working on real-time implementations as an example, we will develop Financial Application. So if not yet installed Blazor in your local Machine, set it now immediately.
Happy Learning !!!!! Happy Coding !!!!!