An exploration of whether Domain-Driven Design (DDD) belongs on the frontend. The original 2019 post argues against it — business logic should stay on the backend due to single-source-of-truth constraints, frontend volatility, and the Open-Closed Principle. The real frontend challenge is maintaining consistent architecture around the chosen tech stack. However, some DDD concepts do apply: packaging by subdomain (screaming architecture), value objects for validation, DTOs as client-side models, and domain events via websockets. A 2020 update from the author reverses the original conclusion, affirming that DDD principles do belong on the frontend, with proper layer separation enabling testable, scalable frontend architecture.

18m read timeFrom khalilstemmler.com
Post cover image
Table of contents
Business logic doesn't belong on the front-endThe real challenge of front-end development is architectureDrawing parallels to DDDGood examples of using DDD concepts in the front-end
7 Impressions