Posts Tagged ‘PHP’
Application <=> Server Management Protocol (ASMP)
While we can automatically update WordPress Core, plugins and themes, we cannot do the same for the components of the WordPress stack that are installed at the server level.
I hereby suggest creating a communication protocol, ASMP, that allows for bidirectional communication between servers and their applications.
Read MoreSingletons And Shared Instances
Given the popularity of the Singleton design pattern, how comes that some developers decry it as an “anti-pattern”? Can it really be that bad?
This article explains the rationale of why it can indeed be that bad and provides alternative approaches that should be used instead.
OOP-NOOB Series – The Publicity Stunt
OOP makes use of access modifiers to control the accessibility of methods and properties. This is what allows you to use the concept of encapsulation, so that you have a public interface that consumers of your code can develop against, as well as a private implementation that needs to be treated as a black box from the outside.
Having all of your methods and properties be public generally defeats the purpose of using OOP in the first place, as most of the benefits depend on the concept of encapsulation in some form or other.
Read MoreStructuring PHP Exceptions
While the consensus is to use exceptions instead of errors, there is very little information on how to structure and manage them in a larger codebase. In this article, I want to talk about the way I currently set them up and use them in PHP, in the hopes to spark some discussion on the topic and get further feedback.
Read MoreBust 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 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 More