With Blazor, Microsoft was the last of the big players to enter the market for single page application frameworks. There, Blazor rivals long-established top dogs like Google’s Angular. This article aims to clarify which Angular and Blazor target groups are interesting.
Blazor is not just Blazor
First of all, we need to differentiate the two versions of Blazor: first there is the server-side Blazor Server. Application status is managed by the server, user interactions lead to communication with the server through SignalR, and HTML fragments are also exchanged through it. If a particularly large number of users are using the application at the same time, the server becomes a bottleneck. Slow connection results in poor user interface responsiveness.
In contrast, there is Blazor WebAssembly. Here the application, including the .NET runtime, is run entirely on the client side in the browser. In the simplest case, all you need is a static web server; the browser must support WebAssembly technology. Once loaded, the application can also be run offline. When Blazor is mentioned in this article, it always refers to the WebAssembly variant, which was also the target expansion stage planned from the start. Blazor Server is more of a stopgap solution.
WebAssembly brings many languages to the web
In order to run Blazor applications in the web browser, the .NET runtime environment is first downloaded and started in Wasm. Then the appropriate dynamic link library (DLL) is obtained with the .NET assembly and executed at runtime (just in time, from .NET 6, early compilation should be possible).
WebAssembly is standardized and has been supported by the four major cross-platform browsers Firefox, Edge, Safari, and Chrome for some time. This is how Blazor differentiates itself from Silverlight, the long-standing, proprietary, plug-in browser-based approach to running .NET applications in the browser.
Angular: the top dog among SPA frameworks
Angular was released by Google in 2016. It is based on Google’s experience with the previous AngularJS framework, which was first released in 2009. This, in turn, was created based on experience implementing large web applications such as Gmail. Angular is the most widely used framework at Google itself.
Arguments for Blazor
Arguments for angular
Blazor is ideal for developers who have knowledge or existing code in the .NET environment who cannot move to a different technology stack and who can tolerate larger bundle sizes. It’s important that Blazor isn’t a magical .NET-to-the-web translation machine: Blazor developers aren’t immune to HTML, CSS, REST APIs, CORS, or operating models in cloud, so it will certainly come into contact with the web. technologies give.
TypeScript-based Angular may even be of interest to .NET developers: Anders Hejlsberg is the same language designer who is responsible for TypeScript as he is for C #. The two languages are often influenced by each other and are syntactically very similar. The framework has been proven successful for years and due to its widespread use at Google itself further development should be assured for years to come. Developers without .NET experience are probably better off with Angular.
Ultimately, it should be noted that there is no functional difference between the two approaches: the same range of functions can be implemented in Angular as in Blazor and implemented on all platforms.
Disclaimer: This article is generated from the feed and not edited by our team.