Blazor — Technology for the future?

Modern business applications, as well as games and office tools, have been implemented as web applications rather than traditional Windows applications for several years now. Web applications consist of a frontend, which, as mentioned earlier, runs in the user's browser. The actual logic (e.g., calculations or data validation) and the application's data storage, however, are executed on one or more servers. The frontend connects to the server, for example, when a user clicks within the application, in order to perform a calculation or to retrieve or save data.

Popular web frontend frameworks

In their early years, web applications were often very simple in their frontend compared to Windows (or other operating system)-based applications. To improve the functionality, presentation, and thus usability of web applications, a multitude of so-called web frontend frameworks have emerged in recent years. These frameworks include components for tables, sliders, cards, panels, pop-ups, information and error messages, and they often simplify or standardize communication with the server. Data can often be dynamically loaded with these frameworks. This means that instead of reloading the entire page, only the elements that need to be changed are reloaded. As a result, the applications become much more responsive.

Some frameworks include or support popular designs like Bootstrap and Material Design. These make it easier for programmers to develop attractive and consistent frontends. Many well-known applications and websites are based on these foundations.

Another advantage of these frameworks is the reduction of JavaScript code or the switch to TypeScript. JavaScript made it possible to bring a certain dynamism to web applications, but it was never appreciated by many programmers and often made applications complex and harder to maintain, and there was a certain dependency on the browser versions used.

Various agencies regularly evaluate these web frontend frameworks, and it's noticeable that new frameworks are presented every few months, some of which quickly become successful. Success means that they are well-received by developers and used productively in projects. Well-known examples include Angular, React, Vue, and, previously, jQuery. Each of these frameworks has its advantages. Some are designed for large-scale applications, while others are geared towards fast and simple development.

Blazor — a new giant in the world of web frameworks?

Since 2018 there has been a new player, Microsoft BlazorBlazor solves one of the major challenges: many web programmers were highly skilled in C#, the most widely used programming language in the Microsoft .NET ecosystem, but never truly warmed to web frontend frameworks, and especially to JavaScript. While Blazor still uses HTML and CSS, the frontend can be controlled primarily via familiar C# code (instead of JavaScript). Controlling the frontend means loading content from the backend, visualizing it in a dialog, validating it, and passing it back to the backend for saving.

By bringing the frontend and backend closer together, significantly faster programming is expected. This, in turn, benefits customers who outsource programming work internally or externally.

Many component providers (tables, sliders, cards, panels, pop-ups, information and error messages) have already specialized in Blazor, further increasing Blazor's appeal to developers. This is also reflected in the growing number of developers already using Blazor for production applications.

With Microsoft as the publisher of this new technology, it can be assumed that it will be continuously developed and supported for many years to come.

The use of Blazor has no negative impact on the usability and design of web applications. Furthermore, it is recommended that experts in this field visually design the dialogues and usability, and that the developer incorporates these specifications into the application.

Blazor is available in "Server" and "WebAssembly" versions.These two variants are briefly explained in the following two chapters. The difference is hardly noticeable to users, but technically the distinction is relevant. Not in terms of the programming language (both use C# and the .NET ecosystem), but in the distribution of elements between the server and the client (the user's browser).

Further technical information can be found in countless online reports.

Blazor “WebAssembly”

In this variant, the entire application runs in the browser. The browser downloads the application to the user's PC or laptop upon first launch (or after a new version is released). The user will only notice this as a slightly longer loading time (a few seconds) the first time they use it; they don't need to install anything. The user's browser then acts as a kind of operating system in which the Blazor application runs.

Typically, the business logic and the database connection continue to run on a separate server. This server provides the frontend with a REST API interface. The server-side implementation can also be based on Microsoft .NET, but it doesn't have to be. The only requirement is that a REST API allows access from the outside. It often makes sense to outsource the business logic (not directly within the Blazor application) if other applications use the same functionality or if different clients (e.g., a web application and a mobile app) are being developed.

If an application is being developed that does not require extensive business logic and data storage, then the Blazor WebAssembly can also be run exclusively in the browser (without API connection).

It is likely that this version of Blazor will be more successful. This version is called a SPA (Single Page Application).

 

Blazor “Server”

With Blazor Server, the frontend of the application is split between a browser and a server. This setup is more similar to traditional web applications. In the browser, for example, a user click is received and sent to the server. The server prepares a response (e.g., a table with data) and sends the generated HTML back to the browser. With this approach, the browser doesn't need to download the entire application; instead, it only receives the necessary amount of HTML code from the server for rendering.

Whether it's WebAssembly or Blazor Server, the growing community and planned further development suggest that Blazor will find its place among frontend technologies and establish itself in the long term. If you have any further questions, please feel free to contact us and we will be happy to advise you..