Web Applications using Blazor Web Assembly

Blazor let's you develop Server rendered web applications, Client rendered web applications and also Native client apps for desktop and mobile.

Web Applications using Blazor Web Assembly

Just like any Frontend Engineer I am always curios about the any new technology that comes for creating Frontend Web Apps.

Recently I was looking into Microsoft's Blazor Framework for creating Web Apps that run on Web Assembly instead of using JavaScript.

Blazor let's you develop Server rendered web applications, Client rendered web applications and also Native client apps for desktop and mobile.

I will be sharing my thoughts about the web applications here in this article, as that's what I was interested in 🙂

In Server Rendered model or what they call a Blazor Server, the razor / blazor components are rendered on the server side, then sent client as pure html, and on the client the UI interactions are then handled by SignalR using WebSockets.

Whereas in Client Rendered model or Blazor WebAssembly, these components are rendered directly in the browser using WebAssembly based .NET runtime. Everything is downloaded to the browser and then it runs locally in the browser, making it blazing fast. At-least in terms of UI interactions.

Blazor WebAssembly apps have two types Standalone webAssembly apps and Hosted WebAssembly apps. Standalone app doesn't require any connection to the server, they run on their own in the browser and are fully interactive. Hosted apps are full-stack web applications. They have shared code for client and server apps. Server part is handled by ASP.NET core. Communication between the server and client apps happen using messaging frameworks like Web Api, g-RPC-web and signalR.

To summarize, Blazor Web Assembly is an improved version of existing ASP.NET framework, which now utilizes WebAssembly to make the client apps run in the browser natively instead of using javascript. Where there are some advantages, there are many dis-advantages as well for using this framework. Some of them are browser support (Latest versions of Apple Safari, Google Chrome, Microsoft Edge, and Mozzila Firefox are supported), download size (Download size of Web Assembly apps can be bigger as it downloads .NET runtime, Razor components, and the component's dependencies. Another disadvantage could be the code security because you are downloading the whole code to the client, it can be inspected on the client and tampered.

That's those were initial thoughts about Blazor. I think its an initial step from moving on from JavaScript for web applications. Overtime things will evolve and improve.

If you want to know more about Microsoft's Blazor Framwork, follow the link bellow.

References:

ASP.NET Core Blazor
Explore ASP.NET Core Blazor, a way to build interactive client-side web UI with .NET in an ASP.NET Core app.
Liked it ?

Read more