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?

