Development Technology Review: Microsoft Blazor

I recently attended a webinar about a new web technology from Microsoft called Blazor. When it comes to web development, there is no shortage of tools, libraries, and frameworks. So what differentiates Blazor from any other technology currently out there?

In a nutshell, Blazor allows developers to run native C# code directly in the browser. This feature is a big deal for .NET developers who struggle with JavaScript and its vast and complex ecosystem that is constantly changing and evolving.

Blazor projects allow for two different architectures in web apps.

  • Server-Side projects are similar in design to other ASP.Net technologies. All the .Net code on the server and uses the end browser as a thin client. The server-side code renders HTML code that is sent to the client browser along with a specialized Blazor.server.js JavaScript file. Where it differs from other ASP.Net technologies is that all events and user interaction is redirected back to Blazor.server.js, which sends information back to the server through SignalR over web sockets. The server-side code then processes those events and sends any UI changes back to the client.  
  • Client-Side projects, on the other hand, differ in that the C# code is compiled to a byte code assembly, which is downloaded by the browser and executed as a WebAssembly, which is then executed directly in the client web browser. Because Blazor uses WebAssembily this means that C# code can run within the browser without any plugins, runtimes, or any other special proprietary packages being installed and is cross-platform. WebAssembly is still able to interact with JavaScript if desired, but developers can choose to limit the involvement of JavaScript in the application.

Currently, only the Server-Side model of Blazor development is available as it was officially released in .Net Core3. The client-side model is available in preview editions of Visual Studios 2019 but is expected to be officially released sometime in 2020 as part of .Net 5.0.

One unique thing about either kind of Blazor project (server-side or client-side) is that in both projects, the code base is nearly identical. The main differences to the code will come in how the application accesses data. For server-side projects, the code will be able to connect directly to the data source, while client-side code will need to follow the same rules as JavaScript and likely access data from a web service.

About Steve Cutler

Steve has 15 years of experience building, supporting and maintaining critical enterprise systems, including technologies like SAP, Microsoft Active Directory, IBM Bigfix.

Contact Us

Have a Question? Get in touch. Profit Point is here to answer any questions you may have, help you with information, and create an effective solution for all of your supply chain needs.
Contact us here