Web Development With Blazor: Introduction (Part 2)
Blazor Server Blazor Server uses SignalR to communicate between the client and the server, as shown in the following diagram: SignalR is an open-source library for real-time communication that establishes a connection between clients and servers. It can utilize various methods of data transport and automatically identifies the most suitable protocol depending on the capabilities of both the server and the client. SignalR prioritizes the use of WebSockets, a transport protocol incorporated in HTML5. If for any reason WebSockets is unavailable, it will smoothly revert to an alternative protocol. Blazor is constructed using reusable UI elements referred to as components. Every component comprises C# code, markup, and may also incorporate additional components. Razor syntax allows you to blend markup with C# code, or you can choose to write everything in C# if preferred. User actions (like clicking a button) or events (such as a timer) can cause the components to be refreshed. The el...