add validation
This commit is contained in:
parent
e0f5e8d04f
commit
7c87b04e23
3 changed files with 24 additions and 2 deletions
24
adr-provs/ddd-validation.md
Normal file
24
adr-provs/ddd-validation.md
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# ddd-validation
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
to be discussed
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
We want express validity on domain objects. Clear described validity helps on
|
||||||
|
* avoid many redundant and unnecessary (null-)checks spread around in the code
|
||||||
|
* collects all validity constraints to one defined place
|
||||||
|
|
||||||
|
### Principles affected
|
||||||
|
|
||||||
|
* Check the domain borders
|
||||||
|
* Do not tie validation to object creation / serialization
|
||||||
|
* propagate validation through aggregates
|
||||||
|
|
||||||
|
![ddd-validation](ddd-validation.png)
|
||||||
|
|
||||||
|
### see also:
|
||||||
|
* [Fowler] Do not use exceptions for validation: https://martinfowler.com/articles/replaceThrowWithNotification.html
|
||||||
|
* [Fowler] Contextual Validation: https://martinfowler.com/bliki/ContextualValidation.html
|
||||||
|
* [Vladimir Khorikov] Some ideas for validation in DDD: https://enterprisecraftsmanship.com/posts/validation-and-ddd/
|
BIN
adr-provs/ddd-validation.png
Normal file
BIN
adr-provs/ddd-validation.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
|
@ -25,5 +25,3 @@ We want to be able to execute single provision steps to apply partial installati
|
||||||
* Vorbehalt2: entscheiden, was in der domain testbar sein muss
|
* Vorbehalt2: entscheiden, was in der domain testbar sein muss
|
||||||
|
|
||||||
* Wir nutzen nur einschichtige Konfiguration, da wir nur noch uns selbst als Nutzerkreis ansehen.
|
* Wir nutzen nur einschichtige Konfiguration, da wir nur noch uns selbst als Nutzerkreis ansehen.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue