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 offunctions
that operate on a set oftypes
and honor a set ofinvariants
that we calldomain rules
3.2.2 Composition with computation the monadic form of computation is thatsuccess
propogates forward and a singlefailure
in 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
aggregate
is the complete domain entity that describes a central concept of the domain model. - Favour skinny domain model.
- Factories return objects which are minimally valid.