Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 205 of 258)

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

Separation of Concerns with Queries and Helper Functions

In the previous post, I shared a little bit about the idea of separation of concerns – a concept that’s usually isolated to software development – and one way in which it can be achieved as it relates to working with WordPress templates.

But there’s always more work that can be done to help make our code as modular, reusable, maintainable, and readable (and any other buzzwords that I forgot ;) as it relates to programming projects.

One of the challenges of working in a system like WordPress is that it doesn’t necessarily promote practices that are typically seen in more classical programming environments, but – the way that I see it – we’re doing many of the same things:

  • Solving problems through the use of code,
  • Abstracting reusable components,
  • Querying for information from a database through the use of provided APIs,
  • Keeping areas of the code modular and related to the areas of the application and their best related,
  • …and more.

So why should we avoid trying to apply better programming practices to our code regardless of if it’s a high-end object-oriented application, or – say – a theme with a number of different templates, JavaScript, styles, and queries (and even more things such as post types and taxonomies depending on the nature of your project)?

After all, it’s all code, right?

Continue reading

Separation of Concerns with WordPress Templates

One of the biggest pain points in working with WordPress templates – or, really, any  PHP and HTML in general – is how we end up jumping from language to language within the context of a single file.

Obviously, this is unavoidable. I mean, the same thing even happens in other frameworks like .NET and Rails, but one of the things that I’ve seen that continually sets WordPress apart (and I don’t mean that in a good way) is that developers often don’t bother to spend time separating their concerns as it relates to the work being done in any given template.

A Vanilla Template File

A Vanilla Template File

For those who have been working in WordPress for several years likely know this, and know the frustration this causes.

For those who have recently hopped into WordPress development, there’s a strong chance you’ve likely been overwhelmed with some of what you’ve seen.

It’s a bummer, I know.

But it doesn’t have to be that way.

Continue reading

Should Products Have Landing Page Consistency?

Last week, I did a “soft launch” for the upcoming release of Mayer.  “Soft launch” may even be more of an overstatement. Honestly, it was nothing more than a tweet to the landing page that I setup to prepare for the launch.

By landing page, I’m not talking about the type of pages that basically announce that a product is coming and that [may] attempt to collect an email address for when its ready.

Instead, I’m referring to product landing pages that detail the product and provide calls to action for purchasing the product, how to find more information, and/or that details features, and all of that fun stuff.

But as I’ve been thinking of additional projects that I hope to release throughout the year, I’ve been thinking about landing page consistency for products across a given brand, and how much it matters.

Continue reading

My Day-To-Day: Lift App, Part 2

This post is the final part in a two part series. Be sure to read Part 1.

At the beginning of January, I shared that I was going to give Lift App a trial for about a month, and then see how well it integrated itself into my day-to-day routine.

Specifically, I had set aside four goals that I wanted to accomplish over the next three weeks (which have since passed), and then I was going to see how well I had stuck to the goals, as well as how well Lift App actually worked at getting me to stick to my goals.

So the result?

Continue reading

A Rule of Thumb for WordPress Partials

For anyone who has worked with WordPress on some level, you’re likely familiar with the concept of templates.

In the context of WordPress, templates are the files in which information retrieved from the database is rendered. In other frameworks or platforms, they may also be called templates, but are also often referred to as views.

But for anyone who has done enough work with building web applications, you know that as much as we like to build reusable components on the server-side – be it functions, classes, or whatever else – that we also like to do so with client-side related code, too.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑