Notice
Recent Posts
Recent Comments
Link
타이핑 노동자 야도
DDD invariant 불변은 aggregate 의 엔티티 유효성 검증 책임 본문
In DDD, validation rules can be thought as invariants. The main responsibility of an aggregate is to enforce invariants across state changes for all the entities within that aggregate.
- Microsoft microservic, Design validations in the domain model layer 중
https://docs.microsoft.com/en-us/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/domain-model-layer-validations
객체의 불면이라고 하면, DDD 에서는 유효성 검증 규칙이다. 어그리게이트의 주 의무는 자신 내부에 있는 모든 엔티티의 교차 상태의 불변성을 강제하는 것이다.
즉, 어그리게이트(대체 이게 뭐야)는 내부에 엔티티들이 상태가 변할 때 그게 하나 건 서로 엮여 있건 어떤 교차 상황에서도 유효성이 검증될 수 있도록 그 규칙을 강제하는 게 책임이다.
Comments