Before we can build the data store, we need to understand what it is we need to build. In this lab, you’ll think through each of the requirements, working to define what makes a store a store, how to interact with it, what functionality is needed, and conceptually how to achieve it, and then what approaches you’ll employ in the series.
What You’ll Be Doing
In this hands-on lab, you and I will walk through each part of the Data Store and its API, visualizing how each part will work internally and externally, and how developers can interact with the items in the store. We’ll explore different architecture designs, lay out how to interact with the items, scope the container that holds the items in the store, and so much more.
You will be actively defining each attribute, convention, and interactivity in requirements documents within the plugin, i.e. via markdown. You’ll use git to add each new requirement into version control incrementally as you progress through the lab.
When you’re done planning out the requirements, you’ll push the branch to your GitHub repo, open a PR, merge it into your
master branch, and then pull the updates down to your machine (sync it).
This lab is comprehensive. It’s vital to planning out what you will be building. Before you build it, first you visualize each part of it, how everything works, and how it interacts. Then when done, you can jump right into the implementation.
Complete Master Series Project
This is a master series, meaning that you are defining, building, and testing a complete project while mastering each part of the process.
We start at the beginning and together walk through the project, step-by-step just like if we were on a team together.
Don’t skip steps. Walk systematically with me throughout each episode of each lab in this series.
What You Will Learn
You will be learning how to visualize a component before you build it and much more:
In this lab, you are not writing code. Rather, you are thinking through all the requirements that are needed to create a data store. This is the planning process.
See the list of prerequisites and suggestions on the series landing page.
Go Pro and grow your expertise and career.
Hands off the keyboard. Web development starts by thinking first, then planning it out, and then coding it.
Total Lab Runtime: 02:39:26
- 1 Planning Introductionfree 02:50
- 2 What is a Data Store?free 03:51
- 3 Defining the Basics of a Data Storepro 09:19
- 4 Document the Basicspro 14:06
- 5 Simulate Store and Getpro 08:46
- 6 Identifying Items in the Storepro 17:07
- 7 Defining the Container: Data Type & Retainpro 16:48
- 8 Reviewfree 05:05
- 9 Feature: Check if Item Exists in Storepro 04:44
- 10 Feature: Remove an Item From the Storepro 06:53
- 11 Feature: Replace an Item in the Storepro 11:29
- 12 Feature: Merge with (Add To) Existing Itempro 10:33
- 13 Feature: Empty the Data Storepro 05:34
- 14 The Need for an APIpro 09:16
- 15 Document the API Basicspro 14:52
- 16 Global, But Controlled Accesspro 07:49
- 17 Push to GitHub, PR, Merge, & Syncpro 08:01
- 18 Wrap it Upfree 02:23
Let's build, test, and validate the basics of the data store. In this hands-on coding lab, you'll build the basic functionality and attributes of the data store in 3 different implementations: procedural, static class, and OOP. You'll build a full test suite. And you'll validate that the code complies to the WordPress Coding Standard.
Check out the Plugin Development Library for more hands-on labs, insights, Docx, and more.
Check out the series page for more labs: Data Store Series – Centralized, Persistent, & In-Memory PHP Storage Project