Tom McFarlin: Namespaces, Autoloading, and Improving Plugin Architecture

One response on “Tom McFarlin: Namespaces, Autoloading, and Improving Plugin Architecture

  1. yogaman5020

    Good talk about important features available in later versions of PHP. Relevant for WP plugin & theme devs as WP moves to PHP 7+ in 2019. Hopefully, plugin developers can move away from prefixing function & method names and use namespacing instead. Makes code so much more readable.

    Like

Continue the discussion

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Published

March 24, 2017

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.

Presentation Slides »

Rate this:

Event

WordCamp Atlanta 2017 43

Speakers

Tom McFarlin 7

Tags

Autoloading 1
Namespaces 1
Plugin Architecture 2

Language

English 7918

Download
MP4: Low, Med, High
OGG: Low
Subtitles
Subtitle this video →
%d bloggers like this: