Member-only story
Stop Writing CRUD Services: 5 Command-Based Patterns for Complex Microservice Workflows
One updateOrder() for every business action? That’s not a service — that’s a dumping ground where anyone can send "status": "APPROVED". Here’s what senior devs build instead.
Every enterprise Spring Boot application starts with clean, simple CRUD services.
You build a standard OrderService or LoanService with four basic methods: create(), get(), update(), and delete(). At first, it's elegant, readable, and easy to maintain.
❌ Generic CRUD Anti-Pattern (Ambiguous & Fragile)
[PUT /api/v1/orders/101] ──► OrderService.updateOrder(101, request) ──► orderRepository.save(order)
(Sets status = "CANCELLED", triggers refunds, releases stock, checks user state)Then business requirements evolve. You can't cancel an order after shipment. You can't approve a loan if the user’s account is suspended. Cancelling an order must release reserved stock, process a refund, and send a notification.
Suddenly, your generic updateOrder() or updateLoan() method becomes an unmaintainable dumping ground of if-else checks, state mutation, persistence logic, and cross-system orchestration.
The problem isn’t CRUD itself — the problem is treating complex business operations…









