Infographic: the Adapter pattern converts different external languages into one common model, the Strategy pattern decides which adapter runs — Controller to Use case to the MenuAdapter port, then on to XFirmMenuAdapter (X API, JSON) and YFirmMenuAdapter (Y API, XML)
Aug 8, 2026 · 8 min

Adapter and Strategy: Keeping External Services Outside the Domain

How to integrate with multiple external services without letting any of them leak into your business logic: one port, multiple adapters, and two ways to choose which adapter should run.

Infographic: on the left the arrow anti-pattern built from nested if-else blocks, on the right the same rules written as a list of early returns followed by the happy path
Aug 8, 2026 · 9 min

Clean Code: Guard Clauses and Early Return

Getting rid of the arrow anti-pattern and writing business rules as a flat flow: guard clauses, early return, and how to test them with unit tests.

Infographic: a single INSERT atomically enqueues the request, then the email queue table, an idempotent claim and delivery to the provider; below it duplicate sends, silent loss, stuck-job recovery, retry and retention, plus a DB poll versus message broker comparison
Aug 8, 2026 · 15 min

An Async Email Sending System: A Stack-Independent Design

An email queue that accepts work with a single INSERT and lets workers handle it reliably: the data model, the race conditions, why exactly-once does not exist, and how to choose between DB polling and a broker.

Infographic: a booking request passes through the links of a chain — flight, seat availability, no-fly list, passport validity and total amount checks pass, and the chain stops at the promo code check
Aug 8, 2026 · 14 min

Chain of Responsibility: Turning Complex Rules Into a Pipeline

Splitting the seat, no-fly, passport, amount and promo checks of an airline booking into independent links of a chain, with Spring Boot.

Infographic: the Facade drawn as a single door in an airport terminal; the client walks in through that door, and behind it sit the payment system, ticket generation, baggage system, notification service and loyalty points
Aug 8, 2026 · 11 min

Facade Pattern: Hiding Complex Subsystems Behind One Door

The Facade Pattern does not remove complex subsystems. It hides them behind one door. Let’s see it in Spring Boot with a real airline booking scenario.

Infographic: a control tower in the middle standing for the Zustand store, surrounded by country selection, shipping method, payment method, order summary and coupon boxes — each connected only to the center, not to each other
Aug 8, 2026 · 10 min

Mediator Pattern: Managing the Mess Between React Components

Using the Mediator Pattern with Zustand on a checkout screen, where country, shipping, payment and coupon components all affect each other.

Infographic: calling getBooks() in a loop after findAll() produces 1 main query plus N relation queries; below it the four fixes — JOIN FETCH, @EntityGraph, batch fetching and DTO projection — with detection tips and rules of thumb
Aug 8, 2026 · 11 min

The N+1 Query Problem: A Silent Performance Trap in ORMs

You load the main records with one query, then run one more query for every relation. How the N+1 problem happens, how to notice it, and which fix to use when.

Jan 1, 2020 · 7 min

Everything This Blog Can Render

One page that renders every feature this site supports, so I can see what a thing looks like before deciding to use it.