Let’s talk about and plan what we are going to do in this lab. We want to build a central repository, some module, that will be responsible for generating and registering post types, taxonomies, and shortcodes. There are different strategies for building a central repository: You can build a central plugin, such as Fulcrum1. Build a package and then publish it on Packagist. Then you’d use Composer to include it into your plugin. Or you can build a module and place it into one of your plugins for the project. 1Fulcrum is currently being rebuilt with some new goodies in […]
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.
Planning it Out
Configuration in ModularConfiguration Architecture
Let’s talk about the “configuration” part of ModularConfig. How do you design your code to be configurable? What does it mean? Why would you want to? Our codebase is filled with hard-coded parameters that specify the implementation we want. For example, registering a custom post type requires: Labels Supported features Arguments Post type name Imagine that your project has more than one custom post type. For example, let’s say you’re building a business-centric website and the client wants: FAQ Portfolio Testimonials Team bios That means, your project has at least four new post types. Think about that. Imagine what your […]
Modular in ModularConfiguration Architecture
Let’s talk about what the modular part of ModularConfig is. How do you design your code to be modular? What does it mean? The de facto in WordPress is to use snippets and boilerplates. This lab introduces you to the modular approach. Boilerplates give you a code structure or template. Then you edit the code to change the implementation. You may go to a website, fill out a form, and then that site automatically edits the code’s boilerplate to change it for you out of convenience. But the code is being changed to fit your project’s implementation. Snippets are tiny […]
What is Reusable?
What does reusable mean to you? Why would you want to use it? In software, the concept of being “reusable” means that you design your code such that you can reuse it project-after-project with minimal to no rework of the code. Think about that. Imagine the time you’ll save when you have a library of pre-built, well-tested, and proven code modules. You can then load the modules and quickly build your projects. But the key is: minimal to no rework of the code. That is what makes it reusable. Why? Think about it. If you pull in a snippet of […]
Lab Introduction
In this lab, you will learn about how to make your code reusable. You’ll learn about what it is, why you want to change your mindset to build code in a reusable way, and then how to do it. You are a professional web developer. It’s your career and/or business. You need to make money. Designing your code to be reusable is a strategy to reduce your time and thus costs over the entire lifecycle of the code itself. In other words, it makes you more profitable. To get started, make sure that you have completed Part 1 and 2 […]
Making the Collapsible Content Plugin Reusable – Part 3
One of our jobs is to build quality code that is reusable again and again without changing the codebase. Ideally, we’d like to configure what’s different and have the codebase the same for all of our projects. In Part 3, you will convert the Collapsible Content plugin into the ModularConfiguration design pattern by moving all runtime configurable parameters into configuration files Then the codebase will be made reusable. The actual implementation then is determined by the configuration file that’s loaded. This approach will save you time.
Evolution of Computing
In order to appreciate just how far this field has come, we need to step back in time and understand the evolution of computing and the computer. Understanding the roots and challenges of those who came before us will help you to visualize your role now and what is possible for the future. Besides, knowing some of the key technological advancements and the key contributors arms you with both perspective and talking points.
Gulp Watch
A task watcher automatically runs gulp tasks when you save a Sass partial. You can wire it up to any of your gulp tasks to automatically watch for the events which trigger each one. Turn on the watch and let it run as you work.
Yoda Conditions: To Yoda or Not to Yoda
Tonya explains the Yoda conditions programming style. She discusses its intent and the problem it seeks to solve. A handy guide and litmus test are included to help you decide when to use it in your programs. Both PHP and JavaScript examples are provided to test your knowledge.