Book review reactive domain modelling
2.6 Making Models Reactive with Scala
- Return type with explicit failure
Try[U]not justU - Do not throw
exceptions - Manage latency with
Futures
3. Designing Functional Domain Models
-
So a
module, as defined in a functional domain model, is a collection offunctionsthat operate on a set oftypesand honor a set ofinvariantsthat we calldomain rules3.2.2 Composition with computation the monadic form of computation is thatsuccesspropogates forward and a singlefailurein the middle exits the computation this means that all sevices we run in computation one after another need to support the monadic form of computation. 3.3 Life cycle - Remember that
aggregateis the complete domain entity that describes a central concept of the domain model. - Favour skinny domain model.
- Factories return objects which are minimally valid.