How-To: Add Two-Way Binding to Blazor Page

In order to support taking user input in components and pages, Blazor supports a form of two-way binding which updates either when the user makes a change in the element or when the system updates the backing property/variable. When the variable changes, this two-way binding works exactly like one-way binding - the component is rendered … Continue reading How-To: Add Two-Way Binding to Blazor Page

Lesson 6.1: Introduction to Azure Storage Options

In this chapter, we will investigate various Azure Storage options for our game services. In the previous chapter, our service just read data from resource files. That isn't very useful for most services, but it allowed us to focus on understanding Azure Functions without getting into storage complexities. However, Azure provides many storage capabilities. All … Continue reading Lesson 6.1: Introduction to Azure Storage Options

How-To: Add Blazor Component Interactivity with One-Way Binding

Building a static HTML page with Blazor is pretty easy, but doesn't make for an interesting application. To support basic interactivity, Blazor components/pages use databinding to show dynamic data and respond to events on the component and its elements. The simplest form of databinding is one-way binding. One-way binding renders the data from our code … Continue reading How-To: Add Blazor Component Interactivity with One-Way Binding

App-Idea 2: Roman to Decimal

Another number conversion project (Roman-To-Decimal) takes numbers represented as roman numerals from input strings and converts them to their decimal value. Again, we will add the ability to convert back from decimals to roman numeral notation as well. This conversion project will use the same layout design as the Bin2Dec project. We will add this … Continue reading App-Idea 2: Roman to Decimal

How-To: Write First bUnit Test

bUnit is a testing library for Blazor components. Its goal is to make it easy to write comprehensive, stable unit tests for these components. We will learn the steps to create our first bUnit test from setup to rendering to validation. This first test will be very simple to allow us to focus on the mechanics of creating the … Continue reading How-To: Write First bUnit Test

Lesson 5.18: The Wrap

Over the course of this chapter we learned quite a bit of new technology and patterns. This chapter really focused on taking our SimpleRPG game to production in Azure and learning how to use Azure Function to build RESTful web services. We moved our game from a single, self-contained unit to retrieving game data from … Continue reading Lesson 5.18: The Wrap

Lesson 5.17: Upgrade Blazor Project and Dependencies to .NET 5

With the release of .NET 5, it is time for us to upgrade our simple-game solution to the latest version of .NET. Luckily .NET 5 is actually the next progression of .NET Core 3.1, so there aren't many major breaking changes to get this to work. We need to get onto the latest versions because … Continue reading Lesson 5.17: Upgrade Blazor Project and Dependencies to .NET 5

How-to: Add bUnit Test Project to Blazor Solution

Having automated tests for our Blazor applications is very important. We can use xUnit (or any other) test framework to write unit tests for the C# classes in our app. However, some part of our logic (even if it's just the databinding logic) lives in Blazor components and pages. For those to be tested, we … Continue reading How-to: Add bUnit Test Project to Blazor Solution