Domain modeling and data expressiveness
Types, signatures, and data structures express domain concepts and the invariants that govern them, instead of flattening meaning into primitives, flags, and generic containers that invite misuse.
Use the descriptions below to decide which individual quality references are relevant. Open only the references that can materially affect the current decision, code, or failure.
- Concepts have explicit types - Important domain concepts are represented explicitly rather than being flattened into vague primitives, strings, flags, and maps.
- Return values are meaningful - Outputs communicate useful meaning rather than ambiguous booleans, magic values, or overloaded null semantics.
- Invariants are protected - The code structure makes invalid states difficult or impossible to represent or persist.
- Boolean blindness is avoided - Flags and ambiguous booleans are not used where richer types or named concepts would express intent better.
- Primitive obsession is avoided - Repeated low-level primitives do not stand in for richer domain concepts that deserve first-class representation.
- Data shape matches behavior - Data structures reflect access patterns and invariants instead of being generic containers that invite misuse.
- Data ownership is clear - It is obvious which component or service is authoritative for a given piece of data or business rule.