Lesson 6.6: Create Table Storage Repository

Now that we have our game data in Azure Table Storage, we need a mechanism for loading that data into our services. To support this, we will implement a new instance IReadableRepository that encapsulates all of the logic for fetching data from Table Storage. The TableStorageReadRepository will follow the pattern that we developed for InMemoryReadRepository … Continue reading Lesson 6.6: Create Table Storage Repository

Lesson 6.4: Refactor Services to Consume Multiple Repositories

In the previous lesson, we created a new BlobStorageReadRepository and exposed various typed instances of it through our RepositoryFactory. Today, we are going to update our FunctionServiceHelper to switch between target repositories based on a query string parameter. This will allow us to easily test our game services using different back end Azure storage solutions. … Continue reading Lesson 6.4: Refactor Services to Consume Multiple Repositories

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.12: Create CD Pipeline for Azure Functions App

In lesson 5.3, we set up a continuous delivery pipeline for our SimpleRPG game Blazor app. We also need to set up a deployment pipeline for our game services. This pipeline will release the latest game services build to our Azure account and Functions App resource. The specific steps of this deployment script will be … Continue reading Lesson 5.12: Create CD Pipeline for Azure Functions App

Lesson 5.10: Complete the Game Services

In this lesson, we're going to build out the three remaining services quickly. We will continue to use the same patterns (DTOs, repositories, and service helper class) that we've used in the previous lessons. If you need to review any of the individual patterns, please review those lessons. QuestTemplateService 1. Create the quests.json file in … Continue reading Lesson 5.10: Complete the Game Services

Lesson 5.9: Refactor Service Code and Create LocationTemplateService

With our implementation of ItemTemplateService and MonsterTemplateService, there is a lot of repetitive code. The act of getting data from the query string and calling the appropriate repository method is boilerplate that can happen in a lot of our services. This code is a great candidate for refactoring into a helper class that contains the … Continue reading Lesson 5.9: Refactor Service Code and Create LocationTemplateService

Lesson 5.8: Microservices Concepts With MonsterTemplateService

With our first service complete, it's time for us to look into creating more services. Each of our data files in the SimpleRPG game can really be thought of as its own service. Each one represents some classes and domain model like items or monsters. And while they may interact with one another (monsters can … Continue reading Lesson 5.8: Microservices Concepts With MonsterTemplateService

Lesson 5.7 Design REST Service for Data Retrieval

REST web services (Representational State Transfer) is a style of architecture based on a set of principles that describe how networked resources are defined and addressed. It is important to note that REST is a style of software architecture as opposed to a set of standards. As a result, applications or architectures are sometimes referred … Continue reading Lesson 5.7 Design REST Service for Data Retrieval

Lesson 5.6: Build Repository Pattern for Data Access

With our simple Azure Functions web service in place, we can now focus on providing more complex functionality from our service. We will focus on read-only service features for now, since we're reading game data and no persisting any data yet. We want to build a service that will return lists of elements based on … Continue reading Lesson 5.6: Build Repository Pattern for Data Access

Lesson 5.5: Create Web Service to Retrieve ItemTemplates

With a working Azure Functions project in place, we are ready to start moving code into our web service. We have various sources of game data: items, monsters, locations, quests, recipes, and traders. Each of these data sources would make a great web service. So let's start by creating a simple web service that loads … Continue reading Lesson 5.5: Create Web Service to Retrieve ItemTemplates