Domain Modeling Made Functional
summary
Shows concrete F# code that models domains as types: F# discriminated unions for choices, option types instead of null, and wrapper types that enforce constraints at construction time (constructors return option). Demonstrates a card game and an email verification flow where business rules become compile‑time guarantees so you cannot set a verified flag without a verified email. Explains how this reduces tests and defensive checks and how to evolve designs while keeping implementation safe.
AI-written summary · about
chapters (12)
- 0:00Introduction to design
- 1:33Importance of shared models
- 4:31Modeling domains in code
- 7:25Interactive design process
- 11:35Code as the design
- 15:34Functional type systems
- 18:46Practical type composition
- 23:55Handling optional values
- 28:18Constrained domain types
- 34:48Replacing flags with choices
- 39:08Refactoring for insight
- 42:05Making illegal states impossible
related talks
51mDomain Modeling Made Functional
52mDomain Modeling Made Functional
46mDomain modelling made simple: Functions and Values
52mType-Driven Development with F#
43mWrite your own domain specific language with F#
46mDesign for errors - An introduction to Domain Modeling with a bit of Arrow
43mIs Maybe an Option (for modelling your domain)?
51mFunctional Programming and Domain Driven Design - a match in Heaven!
