Natural partners: Kotlin and Domain Driven Design
summary
Claims Kotlin and DDD can coexist and scale: N26 runs ~150 microservices with about 50% in Kotlin, and the approach is production‑proven. Concrete practices: model shopping cart and payment aggregates, keep validation and domain logic inside entities, represent state with sealed classes, use data classes for entities and pass repository dependencies into entity methods rather than constructor injection. Tests run with JUnit and Kotlin test, use inner classes to access private fields, and the patterns reduce anemic models while staying persisting via infrastructure converters.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 10:30Layers
- 12:37Use cases
- 14:30Data class
- 18:45Repository
- 20:18Seal classes
- 21:07Payment ICU Pass
- 23:17Refunding Payment
- 25:17State of refunded payment
- 26:05Validation
- 26:59Testing
- 30:07Questions
- 35:49Conclusion
related talks
53mApplying Kotlin in Microservices Using DDD, Event Sourcing and CQRS
36mKotlinCraft: Building Resilient, Testable, and Scalable Applications in the Modern Era
38mEmbracing Clean Architecture in Spring Boot and Kotlin
52mKotlin Backend Development 6 Yrs Recap. The Good, the Bad and the Ugly
44mKotlin is for hipsters
40mDeveloping Micro Services With Kotlin
41mUsing Kotlin to implement Clean Architecture
32mWhen Clean Architecture met Kotlin, A love story
