Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 198 of 258)

Personal opinions and how-to’s that I’ve written both here and as contributions to other blogs.

A Strategy for Organizing WordPress Theme Functions

One of the points of discussion that often comes up among software developers is how to best organize code and files within a project.

Some frameworks enforce for you to follow an organization scheme – such as Rails which prizes “convention over configuration” – and then other foundations, like WordPress, have standards for certain things – like markup and PHP – but don’t have standards for other things.

For example, there’s no real standard on how to name your stylesheet or JavaScript directories. There’s no standard for where libraries should be kept, nor is there a standard for where preprocessed or pre-minified files should be kept.

Sure, most of us have opinions on this, and developers often spend a lot of time (perhaps more time than they’d like to admit) thinking about optimal ways to organize this information, whereas others are happy to dump things in a directory and as long as the project has some semblance of organization (even if it makes sense only to them), they’re good to go.

Granted, there are personality traits at play here, but I digress.

I’m of the former case where I prefer to try to make sure things are highly organized – perhaps to my own detriment – and I try to bring the idea of “convention over configuration” to work I do within plugins and themes.

And though I spend more time talking about plugins, general practices, and other topics here, there are a few guidelines that I’ve been following as it relates to WordPress theme development that I’ve used in both my own projects as well as contract work.

Continue reading

Of Libraries and The Singleton Pattern in WordPress

Over the past couple of years, I’ve written a number of articles about using design patterns in WordPress. One that I’ve written about a number of times has to do with the Singleton Pattern.

Although I’m not really expecting anyone to spend time reading through the following list, some of the articles and/or comments that discuss the pattern include:

The funny thing about blogging is that when you’ve written something two years, one year, or even six months ago, you may not feel the same way as you did when you initially wrote the post. And that’s fine – as far as I’m concerned, it’s an indication of professional growth (or just getting better at what you do).

So with that said, I don’t use the singleton pattern as much as I used to the reasons for which are a topic for another discussion. Instead, I was recently talking with a good friend about implementing the singleton pattern within the context of a WordPress plugin and the discussion really came down to this:

Should plugins that implement the singleton pattern be instantiated in a hook?

Make sense? Continue reading

The Best of Times and Worst of Times of WordPress Development

One of the greatest strengths that’s offered to designers and developers who work with WordPress is the ability to use just about any client-side technology that we’d like. That is to say that for anyone who is working on building themes has the ability to chose from a seemingly endless number of frameworks, libraries, tools, and so on.

Off the cuff and in no certain order, we have technologies like:

Continue reading

The Dangers of Pricing in WordPress Business Models

One of the business models that is common (although not as common as it used to be) in the economy of WordPress is the unlimited support for for a single purchase. That is, you buy a theme or a plugin, and you pay for the product and the purchase often includes a license for lifetime support.

For those of you who have made a similar purchase, then you’ve likely seen some type of pricing defined like this:

  • $X for the purchase of the product
  • Use the product on Y number of domains
  • Unlimited support and updates

And then the above scheme is tiered such that X and Y change based on the amount of money paid toward the product.

But, like I said, this is nothing new and it’s something that we see frequently see, but anyone who has worked with this particular business or who followed this through to its inevitable conclusion realizes that this is a completely unsustainable business model.

To that end, if more small businesses based on WordPress want to have a better shot of “making it” (where “making it” is defined as staying in business – not some arbitrary amount of money to be made), then this particular pricing model needs to die.

Continue reading

The Difference Between Principles and Advice in Leadership

Yesterday, I read a post on LinkedIn which has since been taken down (though thanks Google cache!). Though you can read the entire post in the linked, cached version of the page, a portion of the content can be found here:

I know I fired this person, but I considered that merely a technical matter. I thought we agreed it was the best option for all involved, allowing him to grow professionally elsewhere. It never crossed my mind that he had been FIRED. We just reached the end of our partnership, for now. Time to move on for both of us.

Emphasis mine.

When it comes to topics about running a business, leadership, team dynamics, and all of that, I leave that stuff to be covered elsewhere – this is not the blog for it; however, there are a couple of aspects of leadership and running a business that keep cropping up and that are of interest to me.

And since there are a many people who work in the WordPress Development Community are freelancers, self-employed, or have some type of entrepreneurial venture – be it full-time or part-time – it seems like it’s worth covering even if it’s just in a single post.

To be clear, it’s not that I’m an expert or even an authority on the topic.

Hardly.

But I, like many, have thoughts on some of the material that I read, and figured it may be worth sharing from time-to-time.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑