The popular .NET-based web front-end framework is actually not a unified platform, but there are now four variants of it. Blazor WebAssembly runs completely standalone in all modern browsers, Blazor Server requires continuous interaction between browser and a web server, Blazor Desktop builds native Windows applications based on Windows Forms or Windows Presentation Foundations (WPF), and finally Blazor MAUI runs on Windows, macOS , iOS, Android or Tizen within a .NET MAUI frame application. Blazor MAUI and Blazor Desktop are also collectively referred to as Blazor Hybrid.
The only platform not previously offered by Blazor is the Linux desktop: the .NET MAUI host has so far neglected this platform. A Microsoft employee’s GitHub project, which was supposed to bring .NET MAUI to Linux, has since fallen asleep.
Decision between plague and cholera
Even if only the browser is to be addressed, developers often wish for an application to run simultaneously with Blazor WebAssembly and Blazor Server, because the decision between Blazor WebAssembly and Blazor Server feels like choosing between plague and cholera in some cases .
Blazor WebAssembly has to load large amounts of data into the web browser at the beginning and the binaries are blocked by some firewalls and virus scanners. After that, however, Blazor WebAssembly runs independently and works even if the connection to the server is bad or drops. Blazor Server, on the other hand, loads extremely quickly at the beginning, has no problems with security software and also offers good protection against espionage, because 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, because that is where the state and a copy of the Document Object Model (DOM) are located for all active users.
Therefore, there are advantages to co-hosting an application with Blazor WebAssembly and Blazor Server, for example to use Blazor Server as a fallback when Blazor WebAssembly is blocked by security software. Microsoft is planning improvements for .NET 8.0: Blazor WebAssembly applications can be transmitted in the new WEBCIL format, which should not be blocked. In addition, with Blazor United there should be the possibility of an automatic fallback from Blazor WebAssembly to Blazor Server. However, Blazor MAUI and Blazor Desktop will not be part of Blazor United.
dr Holger Schwichtenberg is Chief Technology Expert at MAXIMAGO, which offers innovation and experience-driven software development, including in highly critical safety-related areas. He is also head of the expert network www.IT-Visions.de, which supports numerous medium-sized and large companies with advice and training in the development and operation of software with 38 renowned experts.