Blog for Junior Developers C#/.NET

Saturday, October 26, 2024

With .NET 8, a new rendering mode called Server Side Rendering (SSR) has appeared. The name itself can be a bit confusing with Blazor Server. However, Blazor Server Side Rendering and Blazor Server are two different things. Therefore, sometimes, for convenience, Blazor Server is also called Blazor SignalR. In this article, I will introduce you to the Server Side Rendering (SSR) mode.

Introduction to Blazor Server Side Rendering (SSR)

Introduction


Back to Blazor Server Side Rendering. This is a new type of rendering that works very much like a regular MPA app, i.e. ASP.NET Core MVC, but is created in Blazor. That is, the code is executed on the server and each request replaces the content of the web page in the DOM.

The whole thing works very quickly, the transition between requests is smooth, and features such as Stream Rendering improve User Experience (UX). The application itself looks the same as a SPA application, but in reality it is not. This mode of application can be great for creating an application where there is no great interactivity, such as a blog, online store, company website, or product landing page.


SEO


An application created as Server Side Rendering is search engine friendly and facilitates SEO and positioning. If you look at the source code of a page created in Server Side Rendering, you can see that all content, all content of the page is clearly visible, just like in ASP.NET Core MVC applications and unlike SPA applications such as Angular, React or Vue. I did not mention Blazor WASM here, because there too, display for SEO has been implemented.


Interactivity


Blazor Server Side Rendering has only 1 drawback. We don't have interactivity here. That is, if we want to handle, for example, clicking a button, then (with some exceptions) we have to use components rendered using Blazor Server or Blazor WebAssembly. And here you can see that we can combine all this and I will summarize the whole thing for you in the next material.


Blazor School


By the way, if you would like to learn Blazor from the inside, consider joining my online training - Blazor School (more information here - https://blazor-school.com/).

Author of the article:
Kazimierz Szpin

KAZIMIERZ SZPIN
Software Developer C#/.NET, Freelancer. Specializes in ASP.NET Core, ASP.NET MVC, ASP.NET Web API, Blazor, WPF and Windows Forms.
Author of the blog CodeWithKazik.com

Previous article - Introduction to Blazor WebAssembly (WASM)
Next article - Introduction to Blazor Web Apps
Dodaj komentarz
© Copyright 2024 CodeWithKazik.com. All rights reserved. Privacy policy.
Design by Code With Kazik and Modest Programmer.