Hey, I'm Robbert 👋

#php

5 posts found

Building a Rules Engine with PHP.

Swampy if-else logic for discounts getting out of hand? A simple rules engine separates rules from the data being checked - way easier to add new conditions without touching existing code.

14 Mar 2021•4 min read

Implementing fizz buzz with the chain of responsibility design pattern.

Solving fizz buzz without a mess of if-statements. The Chain of Responsibility pattern lets you chain handlers together so new ones slot in painlessly.

23 Jul 2020•5 min read

Generating XML files by using the strategy pattern.

Had to send different XML files to a remote server and ended up with copy-paste classes everywhere. The Strategy pattern lets you swap out the "how" without touching the "what".

9 Jul 2020•4 min read

Creating unique numbering sequences using a custom identifier strategy with Doctrine.

Standard auto-increment IDs won't cut it when you need unique numbers per customer. Here's how to roll your own sequence generator that plays nice with Doctrine and stays atomic.

21 Jun 2020•6 min read

Aggregating your data by with SQL views and Doctrine.

Slow aggregation queries killing your app? Use SQL views as read-only Doctrine entities - the database does the heavy lifting so your app doesn't have to.

16 May 2020•4 min read
Back to all posts
githublinkedinstack

© 2026 Robbert