File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -437,12 +437,16 @@ There are several advantages to using such a model:
437437
438438* **Entity state is always valid. ** Since no setters exist, this means that we
439439only update portions of the entity that should already be valid.
440+
440441* Instead of having plain getters and setters, our entity now has
441442**real behavior **: it is much easier to determine the logic in the domain.
443+
442444* DTOs can be reused in other components, for example deserializing mixed
443445content, using forms...
446+
444447* Classic and static constructors can be used to manage different ways to
445448create our objects, and they can also use DTOs.
449+
446450* Anemic entities tend to isolate the entity from logic, whereas rich
447451entities allow putting the logic in the object itself, including data
448452validation.
You can’t perform that action at this time.
0 commit comments