Tag: Design Pattern
-

The Saga Pattern: Managing Distributed Transactions Without Losing Your Mind
Imagine it’s Friday. 4:15 PM. You’ve just deployed the new “Order-to-Delivery” microservice flow. Service A calls Service B, B calls C. It’s elegant. It’s “decoupled.” You go home and feel like a cloud-native architect. Then, at 2 AM, the pager goes off. A customer bought a $2,000 espresso machine. Service A created the record. Service…
-

The Command Pattern in Java: Eliminating Fat Service Classes with Commands and Handlers
Fat Service classes are a liability — one class that does everything is a class that’s impossible to test and dangerous to change. This post shows how to apply the Command pattern in Java using Records, Repository interfaces, and single-responsibility Handlers to keep your business logic clean and isolated.
-

For complex topics, I stop using Spring Services
When we need to write complex Services, using a Object Oriented solution will ease the implementation and facilitate the unit tests.
