Let’s create a new requirements document for the Data Store’s API. Then we work together to layout how we are going to build it.
Labs
Labs are hands-on coding projects that you build along with Tonya as she explains the code, concepts, and thought processes behind it. You can use the labs to further your code knowledge or to use right in your projects. Each lab ties into the Docx to ensure you have the information you need.
Each lab is designed to further your understanding and mastery of code. You learn more about how to think about its construction, quality, maintainability, programmatic and logical thought, and problem-solving. While you may be building a specific thing, Tonya presents the why of it to make it adaptable far beyond that specific implementation, thereby giving you the means to make it your own, in any context.
Review
In this episode, we’ll review what we’ve done so far and then discuss what we’ll do next in this lab as part of our planning.
Planning Introduction
You’ll be introduced to the lab and what you’ll be doing in it. You’ll learn that the best practice in development and engineering is to first planning out what you are going to build before you start coding.
Data Store – Project Setup
Before we start the project, you need to setup the project’s environment. You’ll use this environment and workflow throughout the series to plan, build, test, and validate the data store. You’ll fork the starter plugin, clone it to your local machine, run the starter test suite, and walk through the plugin’s architecture and setup.
Feature: Empty the Data Store
There are times when you want to empty all of the items from the Data Store. For example: When testing, you want to clean up after a test case. Another example is when the data has been used and is no longer needed. In this case, you are releasing the memory for better performance, i.e. optimization.
Feature: Remove an Item From the Store
When an item is no longer needed, removing it will reduce memory. Let’s discuss a remove feature. As we walk through the simulation, we’ll discuss how the remove feature is different from the get feature. We’ll provide a clarification in our Requirements Document.
Wrap it Up
Let’s wrap up this lab and reflect on what you’ve accomplished.
Feature: Merge with (Add To) Existing Item
There are many times when you need to add new parameters to an existing item that is already in the store. One way to do this is to get the existing item, add/combine/merge the new stuff, and then replace the existing item with the new merged item. But what if we could provide that functionality in the store? Hmm, for this to work, the Data Store would have to define what types of data can be merged together and how to do it. That means the Data Store is no longer data agnostic. As an exercise, let’s define a merge […]
Feature: Replace an Item in the Store
Imagine that the default configuration parameters are loaded from a plugin, but you want to replace those parameters with your own implementation. To make this work, the data store needs a way to replace an existing item with a new one. What if the item doesn’t already exist in the store? Should we go ahead and add it? Or should we alert? Let’s explore deeper as we continue to plan out the requirements.
Feature: Check if Item Exists in Store
What if someone needs to check if an item exists in the store? That sounds like a viable use case, right? Let’s talk about adding this feature to our requirements.