When does Blazor (not) render?
This blog post whill shed some light on when Blazor renders your content. Of course there are obvious candidates, but there are also some things to be aware about.
This blog post whill shed some light on when Blazor renders your content. Of course there are obvious candidates, but there are also some things to be aware about.
If you use a public Blazor Server application (like this blog is) and you want to expose an RSS Feed (I know kind of old school) you can perfectly do that with Blazor Server and a little help from a nuget package from Microsoft. Furthermore this guide is not only valid for Blazor but every ASP.NET Core endpoint.
What happens when a user navigates away and still has a pending request to our server? Or what happens if we have a request which might take forever and wastes our resources?
Let's tackle these problems with a CancellationToken
.
This short blog post will show you how to utilize Bootstrap to create a small and reuseable ModalDialogComponent
.
In our Blazor components we often call a repository or web API which takes some time. So it is nice to indicate to an user what the current state is. That is why we will create a small indicator even with steps to indicate how far we are in the progress.
Just imagine you have your beautiful model in a form. And Blazor is very kind and does validation for you. It is really straight forward because you can annotate your model with some attributes like RequiredAttribute
to tell Blazor: "Hey this property has to be set, otherwise the form will not be submitted."
But what if you want to have that easy setup with attributes but also want to say to Blazor: "Hey this property has to be set, if the other property is true.* Well, that does not work out of the box. So let's make it together!
Blazor is a beautiful framework for building SPA's. One advantage is that those SPA's feel like native applications. We do not feel that stuff is necessarily loading. But for that we have to keep our code performant.
This guide will highlight some of the techniques to keep your Blazor app running smoothly. We will also cover some more advanced use cases.
Blazor comes with the option to prerender your webpage on the server. This works for the client-side version as well as the server side version of Blazor.
Let's have a look how does it work and what might be some pitfalls and how can we come around those.
Since .NET5 we have the ability to "virtualize" a component.
But what exactly is that and how do we use it?
This blog post will show you a lot of details about the <Virtualize>
tag.
You probably are well aware of the Lifetime Scope for ASP.NET Core website.
There are basically 3 scopes: Transient
, Scoped
and Singleton
. Let's have a look how they differ in Blazor Client and Server.
This time we will have a look at end to end testing. For this we are using the Playwright C# library from Microsoft. This is the second part of the series. Go here for Part 1
This blog post should give you an easy and good introduction how to unit and end-to-end test your Blazor Application. Furthermore it does not matter if we are running server side or client side aka WebAssembly. The main two libraries we are using is first bUnit for unit-testing and Playwright for end-to-end testing. So let's dive in!
With .NET6 there is a lot to come what makes ASP.NET Core and especially Blazor better and more usable. In this article I will show some things which will definitely come (like AoT Compilation) and some things which might come (native Drag'n Drop support). Overall I feel .NET6 will be a big release which polishes the .NET Environment. Very looking forward.
In this article I will show you why I created my own blog-software from scratch and why I have a blog in the first place. Short answer: I like to know how to create a blog and I like blazor. Long answer you will find in the post.