Imagine, for a moment, the ability to add a new class to your WordPress plugin and not have to worry about adding a new include statement and having the ability to organize the class into a pre-defined package structure.
Sounds nice, right?
Unfortunately, one of the problems that WordPress plugins developers face is having to work with older versions of PHP. But it’s really not as bad as you may think.
Although we sometimes, we sometimes have the ability to use newer versions of PHP (and that’s great), it doesn’t mean we have to forgo poor development practices.
See, depending on the paradigm with which we build our projects (namely, object-oriented programming), we have the ability to take a lot of redundant code out of our plugins.
Furthermore, we have the ability to more easily organize our code at both a conceptual level and at a virtual level.
In this presentation, I walk everyone through namespaces and autoloading, explain how they work, why they are beneficial, and then will show sample example code on how it works. I’ll also provide a downloadable plugin that they can use to study.