Blazor: The Four Variants of the .NET-Based Framework
Blazor is a popular .NET-based web front-end framework, but did you know that it actually consists of four different variants? These include Blazor WebAssembly, Blazor Server, Blazor Desktop, and Blazor MAUI (which runs on multiple platforms). Blazor MAUI and Blazor Desktop are collectively referred to as Blazor Hybrid. However, there is a notable absence in Blazor’s presence: the Linux desktop. The .NET MAUI host has yet to include this platform, despite a GitHub project for .NET MAUI on Linux by a Microsoft employee.
Choosing Between Plague and Cholera
When developing web applications, the choice between Blazor WebAssembly and Blazor Server can sometimes feel like choosing between plague and cholera. Blazor WebAssembly requires loading large amounts of data into the web browser at the start and the binaries may be blocked by some firewalls and virus scanners. However, Blazor WebAssembly runs independently and works even if the connection to the server is bad or drops. In contrast, Blazor Server loads extremely quickly and offers good protection against espionage since the C# program code does not leave the web server. However, Blazor Server needs a constantly good network connection between client and web server as well as a certain amount of RAM and computing time on the web server for each user. Therefore, co-hosting an application with Blazor WebAssembly and Blazor Server can offer certain advantages, such as using Blazor Server as a fallback when Blazor WebAssembly is blocked by security software.
Future Improvements for .NET 8.0
Microsoft is planning improvements for .NET 8.0, such as the ability for Blazor WebAssembly applications to be transmitted in the new WEBCIL format, which should not be blocked. Additionally, Blazor United will provide the possibility of an automatic fallback from Blazor WebAssembly to Blazor Server. However, Blazor MAUI and Blazor Desktop will not be included in Blazor United.
About the Author
Dr. Holger Schwichtenberg is the Chief Technology Expert at MAXIMAGO, which offers innovation and experience-driven software development. He is also the head of the expert network www.IT-Visions.de, which provides advice and training in software development and operation for medium-sized and large companies through 38 renowned experts.