Software Development
Bust That Cache Through A Content Hash
There are different approaches to bust the cache when your static assets have changed. I’ll briefly touch upon the most common one before describing the method I use on my sites.
Read MoreIncluding A Constructor In Your Interface
Having a constructor in an interface is a bad idea, even though PHP might allow it. In this article, I want to explore the reasoning behind that statement.
Read MoreOOP-NOOB Series – That Which Cannot Be Named
Wrapping procedural code is known as “Poor Man’s Namespacing”. While it does help avoid namespace collisions in legacy code, it is still procedural code. OOP is not about syntax.
Read MoreOOP-NOOB Series – Introduction
“Object-Oriented Programming – No Object-Oriented Benefit” – a series of articles on how NOT to write OOP PHP code.
Read MoreAdding A Central Autoloader To WordPress
Including an autoloader within WordPress is not an all-or-nothing endeavour. With a few simple changes, we can have a fully functional autoloader being loaded with WordPress, and we can start refactoring the existing Core code to gradually load more and more classes (and even functions) through the autoloader.
Read MoreAdding Git Hooks Through Composer Dev-Dependencies
I have been working on refining my development workflow for some time now, in order to optimize the quality of my code. And as I am a big fan of automation, I tend to look for tools that just do their work in the background and only need my input when my mental processing power is truly…
Read MoreAttracting Developers To WordPress
Ryan McCue, Senior Engineer at Human Made and WordPress Core Developer, has posted a series of tweets regarding the fact that WordPress is far from an ideal platform for developers, which has spawned a lot of discussion. https://twitter.com/rmccue/status/710464212183572481 https://twitter.com/rmccue/status/710469646680399874 As a long-form response to this, here’s a list of changes I would like to see in WordPress,…
Read MoreType Declarations using Interfaces in PHP
I’ve recently completed a preliminary code audit on an existing WordPress plugin, and one of the goals I’ve set for that audit was to decouple the code from the JavaScript library it was using, so that it could easily be extended to support future versions of that library. A question came back about the constructor syntax…
Read MorePHP Feature Detection Library
Link to GitHub Repository: PHPFeature I had a short conversation on Twitter the other day with Andrey Savchenko ( @Rarst ). He was wondering whether feature-centric PHP requirements would work in WordPress extensions. Although he was talking about the features of the “WP extensions”, I asked myself why there was no feature detection library available for PHP,…
Read MoreIs WordPress a Dependency?
I am currently on a quest to find the perfect setup for my WordPress projects (who isn’t, right?). I do think that a large part of what makes or breaks complex software projects is dependency management. And there are dependencies at every level of your projects, be they languages, libraries, servers, stakeholders, whatever. When someone…
Read More