Embracing Immutability: The Theory Behind Readonly Classes

As the code base of a project grows larger and larger, maintainability, predictability and “clean code” is getting more and more a key strategy for successful projects. While it is totally ok to have “quick and dirty” smelling code for prototypes and MVP’s, things change dramatically for scaling projects in production. In this blog post, … read more …

Towards Powerful PHP Applications: WeakMaps and Their Practical Usage

PHP introduces WeakMap datastructure with version 8.0. This new data structures is capable of containing objects while simultaneously enabling them to be cleared via garbage collection once not needed anymore. WeakMap is a evolution of weak references added with PHP 7.4 and enables the development of collections of references that can be subjected to garbage … read more …

How and When to Use PHP’s Pure Intersection Types

In this publication of my PHP related blog series, I want to address Pure Intersection Types in PHP. In the previous blogs of the series, I addressed different features added to PHP with PHP 8 and PHP 8.1. The first blog was about readonly properties, the second one focused on Enums and the third and … read more …

About Mocking in Unit Tests

Recently at SCAYLE, I wrote a Laravel service that inserts data using Eloquent into a table like this: For people not familiar with Laravel/Eloquent: The HelloWorld model mirrors the database structure and the save method persists data into the database table. So far, so good. Like for any good and responsible project, I wrote unit … read more …

Data Transformation with Benthos

For a current project, I need to read data from an API, transform and push it to an AWS S3 bucket. Normally I would consider to use a standard programming language for that because there is no “magic” involved. However, one of the requirements is to use Benthos, a tool for “Fancy stream processing made … read more …

A few Notes about Migrating to Laminas

In 2019 I wrote about a MySQL 5.7 migration at Check24. While it is very exciting when working on new features, it is also a good thing to think about the architecture and use modern frameworks and libraries. Working on the architecture provides also the opportunity to improve source code quality and introduce quick wins. … read more …

Scalable System Design: Design a Contact Tracing System

In this post, I want to address scalable system design and how to grow a system while it’s user base grows. Because talking only about the theory can become boring very quickly, I want to discuss this topic on a practical example. Before I start with the design itself, keep in mind that there is … read more …

Migrate a Keestash App from jQuery to Vue.Js

When starting Keestash back in late 2018, I was focused on the PHP backend and how things might work “out of the box”. The frontend needed just some click handlers here and there and thus, jQuery was the choice. Now, about two years later, things have changed a bit. The frontend got a boost with … read more …