With .NET 10, Microsoft went back to the drawing board on how Blazor WASM starts up and ships assets. Instead of making minor, pathed fixes to Blazor WASM, they reworked compression, caching, and bootstrapping. The results are smaller downloads, faster first loads, and a developer experience that finally competes with the mature front-end frameworks. Here’s … Continue reading Blazor WASM in .NET 10 has Faster Startup
Tag: Blazor
How-To: Create Blazor Dark-Mode App with Bootstrap 5.3
Many web applications today support dark-mode display because users (and especially developers) enough the benefit of reading content with a dark background. Blazor apps that are built with Bootstrap 5.3 can easily support dark mode in their applications. In this article, we will only focus on defaulting the application to dark-model... a future article will … Continue reading How-To: Create Blazor Dark-Mode App with Bootstrap 5.3
Blazor and React Comparison
I found this interesting article from an Infragistics developer comparing features and performance between Blazor web apps and React apps. His analysis seems pretty accurate, with Blazor making great strides over the last couple of years. And now it's mainly a choice of developer knowledge and productivity. As a .NET developer, Blazor gives you a … Continue reading Blazor and React Comparison
CSS Isolation in Blazor Components
This article has great examples of using the CSS Isolation feature in on Blazor components. Being able to package up CSS closer to the actual component definitely makes it easier to layout your component the way you want without a huge css file in your project. It also helps with reuse because the CSS for … Continue reading CSS Isolation in Blazor Components
How-To: Verify Blazor Navigation in bUnit
Blazor components and pages can have normal HTML hyperlinks and navigation driven in code. Both forms allow users to move between pages. Blazor has the NavigationManager which allows our code to perform URL navigations. And, bUnit provides a mock NavigationManager to allow test code to request a navigation without actually performing it. Under our test … Continue reading How-To: Verify Blazor Navigation in bUnit
How-To: Use Class File for Blazor Logic Code
As our logic continues to grow and our testing requirements increase, we will find that it is more efficient to separate our application logic from the rendering logic on pages. This split helps us separate these concerns and build cleaner pages. Also, having the logic within a separate C# class allows us to unit test … Continue reading How-To: Use Class File for Blazor Logic Code
How-To: Use Blazor Code-Behind File
In Blazor, sometimes our page code becomes large and cumbersome. Rather than keep all of the HTML markup and C# code in the same .razor file, we can split our markup and code into separate files. Blazor supports creating code-behind files for the .razor file (similar to other .NET technologies like WinForms, ASP.NET, WPF, etc). … Continue reading How-To: Use Blazor Code-Behind File
How-To: Write bUnit Tests for Pages with Parameters
Page routing parameters allow developers to pass data to pages in their URL. bUnit allows us to pass routing parameters to pages, so that we can validate their behavior with test data. These parameters are set as part of the TestContext rendering process. This works exactly the same way as testing component parameters. First, we must have … Continue reading How-To: Write bUnit Tests for Pages with Parameters
Lesson 6.5: Create Azure Tables with Game Data
As we did with blob storage, we need to setup a storage account and the individual tables in Azure Table storage. In this lesson, we will focus on the steps needed to setup the account and tables through the Azure Portal. Then, we will add all of our game data to the appropriate tables. We … Continue reading Lesson 6.5: Create Azure Tables with Game Data
App-Idea 7: CSV to JSON Converter
Our next app-idea is the build the CSV to JSON Converter. This allows us to go back from a CSV definition to a JSON file format (the inverse of App-Idea 6). We allow users to input free-from text in CSV format or load the data from a CSV file. Then provide a conversion function to … Continue reading App-Idea 7: CSV to JSON Converter