Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 184 of 258)

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

Everything Is Bloated, Nothing Is Good

One of the things that’s becoming more and more common place regarding front end frameworks, utilities, or applications is the use of the phrase “it’s bloated” followed by an argument as to why we should dismiss it.

No, this isn’t something that’s new, but it’s something that’s becoming appears to be becoming more mainstream – at least as far as I can tell – in how people describe the tools, apps, frameworks, libraries, and other tools that they work with today, or have worked with at some point in the past.

Obviously, this isn’t to say that nothing is bloated – I mean, I’ve written enough articles on the idea on “decisions, not options” and on how things should be more focused on a single niche – but sometimes I think that we often write off certain utilities as being “bloated” when that’s not exactly the case.

Just because something has a number of features that you don’t use doesn’t make it bloated.

Continue reading

JavaScript and WordPress Page Performance

Last week, I was having a conversation with a fellow WordPress developer about improving page performance as it relates to JavaScript. Specifically, we were talking about if it makes sense to load JavaScript sources at the bottom of the page.

If you’ve done any client-side development for a moderate length of time, odds are strong that you’re well-aware that it’s considered a best practice to include JavaScript sources before the closing body tag rather than in the head element.

This is because it allows the browser to render the page more quickly without waiting for larger files to download (and JavaScript files are normally heavier than HTML documents because of their file size and the processing they do on the DOM).

There’s a lot that could be said with respect to this in terms of general web development, but in terms of WordPress, opting to enqueue your scripts at the bottom of the page versus the top of the page may require a bit more consideration.

Continue reading

The Beginner’s Guide to Type Coercion

This week, I started a new series on Tuts+ Code that walks readers through understanding type coercion.

Type Coercion

Type Coercion

Generally speaking, the series of articles starts at the most basic level by discussing strongly typed and weakly typed languages, data types and how they work in different environments, and then begins to branch out more into how data types work within dynamically typed languages.

The main motivation for this is because people who are coming from a strongly-typed background, or those who are just getting into programming may end up finding themselves making a few mistakes especially as it relates to comparisons, conditionals, and other similar evaluations.

This series aims to mitigate that.

Continue reading

Aim for a Single Way to Achieve a Single Task

When it comes to user interface design and user experience, I’m no expert (nor have I ever claimed to be). I’m barely an intermediate. if even that. I’m fortunate enough people to have peers who are willing to review certain projects in order to help tighten up certain aspects of my work.

I don’t think we should ever be afraid or ashamed to ask people who are more skilled than us in a certain area to help us out (or to pay them, even!). After all, we have nothing but to benefit from it.

This doesn’t mean that a couple of ideas, rules, and general practices haven’t come up over the years.

For example, one of the rules of thumb that I have whenever I am working on a user interface is to try to make sure the user only has one way of achieving something.

In other words, I don’t like it when there are multiple ways to do the same thing. I think that it confuses the user, it complicates the code, and it makes it more difficult to maintain over time. The code aspect of this is enough content for another post.

For now, it’s just about finding a single way to achieve one task.

Continue reading

Thoughts on Design Patterns in WordPress

Whenever the topic of talking about using WordPress as a foundation for web applications comes up, I always get mixed reactions. That is, I’ll hear anything from how that’s a silly idea to how a person wants to know more (as well as everything in between).

One of the more common things that I hear developers often try to do is to retrofit the MVC pattern around WordPress in order to try to make sense of how existing themes, plugins, and applications work, as well as how they can take advantage of MVC to produce their application.

Don’t do that!

WordPress doesn’t use MVC. It uses the event-driven design pattern. But for whatever reason, this doesn’t stop us from trying to wrap MVC around WordPress. When it comes to design patterns in WordPress, there are other approaches.

There are reasons for why I think this is a relatively common trend, but there are alternative ways to approach development on WordPress, as well.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑