Blazor in dotnet 8.(Static Server Side Rendering)
Tags: csharp, microsoft, dotnet
Published: 2024-03-24 09:25:01

In this post, we discover these changes significantly in the new features of Blazor in Dotnet 8 to improve web user experiences, interactive components in DotNet Web, which are never forgotten by developers based on Blazor.

**1.Static Server Side Rendering**:enhances the benefits of static server side while experiencing such a SPA.
Static server side means content will create and render the whole DOM on the host server and send it to clients, then only present static content on DOM. This is amazing for SEO frendly, delivery content very fast, no require client resources. Obviously,it is fall, if you want to handle user-interactive events such as click events, sort data, vv. These events will be sent to the server handle and then sent back to the client. Or create a web socket(SignR) and you can communicate with users in real time and both receive events and handle them. But it is hard to scale the web application.

Blazor in Dotnet 8 introduces a new hosting model called static server-side rendering. Although the procedure has the same look as Razor page or MVC app, it just takes an HTTP request type to communicate with user's browser and reply with HTTM.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q69ztrkxhaklk6ezdiwd.png)

It is true that static server-side rendering is good for scale, delivering content very quickly while you still can provide smooth user experience through 
**Auto Render Mode in .NET 8**.
Though smart serve users on client or server rendering on each situation.Auto Render Mode elevates the user experience by reducing load times and improving interactive performance, making Blazor an even more enticing framework for modern web development.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/abx4j0d2lpipbjki3ile.png)




**2.Streaming Rendering.**
Streaming rendering is another promising capability in DotNet 8 Blazor. Using server-side, the full HTML page is rendered by the server. Blazor has the improvement section content. Section contents that need too long times queries are streamed. The cool thing here, Page can render placeholder content while asynchronous operations are in progress. Data calling completely doesn't require other requests and seamlessly patched into the DOM.
When using **streaming Rendering** initial HTML page is still rendered on the host side.It means that it doesn't need more client resources. It’s all about improving then limited user delay experience by minimizing wait times.

**Conclusion**
These improvements for Blazor today bring many promises that we will enjoy DotNet Blazor. 
Server-side rendering, or SSR, is the new default for Blazor applications, and components use the classic approach of processing all logic on the server and producing static HTML that is sent to the client effectively.
Streaming rendering can be thought of as an SSR+ mode. If your application has to make long running calls when constructing a page, and those calls don’t work well with caching approaches, then streaming rendering is going to be a great option.

Please give a👏if you want to see more articles like this!