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.
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.
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.
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.
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.
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.
Let’s wrap up this lab and reflect on what you’ve accomplished.
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 […]
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.
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.