yrachid / kotlin-adt-domain-modeling

Domain Modeling with Algebraic Data Types

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kotlin-adt-domain-modeling

Domain Modeling with Algebraic Data Types

Inspired by this talk and this article.

How can we diminish primitive obsession when modeling domain classes?

How can we make our domain classes better communicate what are their boundaries? E.g.: Instead of validating and documenting that a phone number must have only 9 digits, why not making a Digits9 that will represent exactly that instead?

"Make illegal states unrepresentable." - Yaron Minsky

About

Domain Modeling with Algebraic Data Types


Languages

Language:Kotlin 100.0%