Suggestions for Organizing Procedural Code How I write WordPress plugins using procedural programming versus object-oriented programming and how I go about organizing procedural code.

For as much as I write about – and am a fan of – object-oriented programming, I don’t write much about the times in which I’m working with a procedural code base.

Procedural programming is a programming paradigm, derived from structured programming, based upon the concept of the procedure call. Procedures, also known as routines, subroutines, or functions, simply contain a series of computational steps to be carried out.

Sometimes, I come by this from the requirements of a project, sometimes it’s from a project that I’ve inherited, or sometimes because of something else.

I think it’s important that, as programmers, we don’t hold one paradigm so high that we shy away from working with other ways of writing code. After all, the act of writing code is, at its core, about solving a problem.

How the problem is solved may be considered secondary.

Regardless, whenever I’m working with a code base; however, it’s written, I still try to make sure it’s organized in a way that’s cohesive, as easy to follow as possible, and is able to be maintained over time.

Organizing Procedural Code

I thought I’d share how I approach writing WordPress plugins using procedural programming versus object-oriented programming and how I go about organizing procedural code.

If nothing else, perhaps this will give you some ideas for a current or future project.

Continue readingSuggestions for Organizing Procedural Code How I write WordPress plugins using procedural programming versus object-oriented programming and how I go about organizing procedural code.

WordPress Widgets: Refactoring, Part 12 We're going to working on the area of the code that renders information for the user on the public-facing area of the site.

As far as refactoring the WordPress Widget Boilerplate is concerned – especially given how far we’ve come since the project started eight years ago – we’ve done a lot of work.

We’ve brought it up to a far more modern standard and we’re making it far easier to work with it such that building future widgets should be easier. And this is not only from the standard of the boilerplate but from an object-oriented standard so that maintenance and code quality is higher.

In the last post, we wrapped up much of the work for the administration area and are ready to begin our work on code for the front-end.

We said:

Next, we’re going to look at rendering content on the front-end. We’re nearing the end, of the refactoring of the Boilerplate but there’s just a bit more to do before we’re ready to merge it into the master branch of the codebase.

So in this post, we’re going to pick up there. Now if you’ve been following along up to this point then you should have everything you need from the develop branch.

If not, be sure to pull it as that’s where we’re going to pick up in the remainder of the post.

Continue readingWordPress Widgets: Refactoring, Part 12 We’re going to working on the area of the code that renders information for the user on the public-facing area of the site.

Discover Object-Oriented Programming Using WordPress Discover Object-Oriented Programming Using WordPress is something that should be in any WordPress developer's library.

If you’ve read this blog for any length of time, specifically in the last two or three years, then you know I’m a fan of object-oriented programming especially so in the context of WordPress.

And if you’ve followed me on Twitter, you know that – like many of you – I’ve met many people who I consider to be legitimate friends (versus the bastardization of the phrase by sites such as Facebook)

On top of that, you know one of my favorite past times on Twitter is trolling said friends. So far, though, this entire post is all about my friends and me and, ahem, trolling.

So what’s the point?

Ultimately, it’s to give you a heads up something that’s been released today, that’s been a long time in the making, that’s finally available, and that’s going to help anyone who wants to be a better WordPress developer.

Continue readingDiscover Object-Oriented Programming Using WordPress Discover Object-Oriented Programming Using WordPress is something that should be in any WordPress developer’s library.

It’s a Trilogy (with Models and Music) The show reaches a bit of a milestone with three whole episodes, I suppose. I mix up the format again and answer two questions.

This is the third episode of the podcast and, as you can tell by the title of the show notes, this is a bit of a milestone. At least, it’s considered as such for movies and books.

For podcasts, I don’t know. For this one, sure. Why not?

Episode 3 - It's a Trilogy

If you subscribe to this using one of the various services on which it’s available, you may have already listened to it. If not, then consider it ready for you whenever you’re ready to listen to it.

I’m still working on the format of the show to try to make it as focused as possible so I’ve adjusted the order of material a bit again (and dropped a segment out).

This leaves time for more than one question as well as more detailed answers.

To that end, I think this episode is one of the strongest thus far. But that’s really your call, isn’t it?

Continue readingIt’s a Trilogy (with Models and Music) The show reaches a bit of a milestone with three whole episodes, I suppose. I mix up the format again and answer two questions.

Taking Aspects of WordPress for Granted When you're used to having complete control over an environment and it's revoked, what then?

Because of the open-source nature of WordPress, one of the luxuries that many of us are used to having is complete control over the environment in which we’re working. Given that, you might even say that we take certain aspects of WordPress for granted.

And I’d say that for the majority of projects on which we work, this is true.

By that, I mean we’re not only able to customize, extend, and even limit the software (for certain types of users), we’re also able to change certain aspects of its configuration.

But if you’re in the business of doing work for others – an employer, as part of a contractor, or in some other situation – you may be limited in just how much customization you’re able to make.

Continue readingTaking Aspects of WordPress for Granted When you’re used to having complete control over an environment and it’s revoked, what then?