Building an API from the Domain Outwards

When building backend services, it is very easy to start with the framework. Create the controller. Generate the database entity. Add the repository. Then somewhere between HTTP requests and database tables, try to find a place where the business logic fits. I have built many systems this way. It works. Until it doesn’t. Over time I have started moving in the opposite direction: Start with the domain. Everything else is just an adapter. ...

July 5, 2026 · 3 min · Johan Basson

Railway-Oriented Programming Without the Magic

A practical introduction to Railway-Oriented Programming in Kotlin using Arrow’s Either. Learn how to replace exception-driven business logic with explicit, composable error handling.

July 2, 2026 · 4 min · Johan Basson

Class Per Use Case: A Simpler Way to Structure Applications

One of the principles that has shaped how I write software over the years is that code should explain itself.

June 30, 2026 · 4 min · Johan Basson

Why I Chose http4k Instead of Spring Boot

Why I chose http4k over Spring Boot for my latest Kotlin project, and the trade-offs I considered.

June 20, 2026 · 3 min · Johan Basson

Every Abstraction Has a Cost

Abstractions make software easier to change, but they also make it harder to understand. The challenge is knowing when they’re worth the cost.

June 27, 2025 · 2 min · Johan Basson

Code Should Read Like Documentation

One of the principles that has shaped how I write software over the years is that code should explain itself.

June 24, 2025 · 2 min · Johan Basson

How Functional Programming Changed the Way I Write Kotlin

Functional programming didn’t change the language I use. It changed the way I think about designing software.

June 10, 2025 · 2 min · Johan Basson

Why I Don't Like Generic Repository Interfaces

I used to create a repository interface for every aggregate. Over time I found a simpler approach that makes dependencies more explicit and business use cases easier to understand.

May 13, 2025 · 2 min · Johan Basson