Writing idiomatic Go using Domain Driven Design
summary
Claims that Domain‑Driven Design can be applied idiomatically in Go without forcing an OOP style, and demonstrates concrete techniques: use packages as bounded contexts, split events by domain, add an anti‑corruption layer or small pubsub translator to avoid package imports, and prefer value type (immutable, validated Title) and repository pattern interfaces near aggregates with DB implementations under internal. Shows factory functions, unexported fields, and error constants for comparisons; argues these choices make testing, DB migration, and decoupling practical even though Go cannot guarantee an always‑valid type.
AI-written summary · about
chapters (7)
- 0:00Introduction and speaker intro
- 3:34From PHP to Go and DDD
- 8:10Bounded context in Go packages
- 15:10Tactical DDD patterns in Go
- 22:53Value types in Go
- 27:49Repository pattern in Go
- 32:21Conclusion and Q&A
related talks
47mDomain-Driven Design in Go — It Doesn't Hurt (Much)
49mExploring domain driven design in Go
29mRethinking Domain-Driven Design in Go
42mFrom Chaos to Domain Driven Design in Go
44mGo in Domain Driven Design
59mDomain-Driven Design - Where Rubber Meets the Road
55mDomain-Driven Design: back to the roots
30mFrom Chaos to Domain Driven Design
