Modular Design in Elixir
summary
Argues for designing around behavior not nouns and shows concrete refactors: replace a slug column with a separate slug table that maps slug↔ID, extract notification logic into pure functions driven by a periodic job, and split drafts from published items into publish/draft tables so each module has three minimal APIs (create/list/publish). Result: fewer fields, easier isolated tests, and impossible-to-misuse invariants; cost: extra tables/queries, trickier reporting and occasional performance tradeoffs.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:50Project overview
- 2:10Modular design
- 5:05Example project
- 7:25Slugs
- 10:50Notification
- 12:00New Features
- 14:25Job schema
- 15:50Slug extraction
- 19:10Notification extraction
- 22:15Publishing jobs
- 28:30Summary
- 31:00Downsides
- 36:18Job stable
related talks
51mModularization: Foundation of Microservices and Monoliths
43mThe Tyranny of Structurelessness
19mStructs for order
01h 24mA new modularity for software
01h 01mArchitecture Decisions: A Case Study -
24mThe Alchemist's Code: Bringing More Value with Less Magic
53mCrafting a self-documenting Modular Monolith with DDD principles (theory not included)
46mModular Applications with Spring
