原书出处
Domain-Driven Design Tackling Complexity in the Heart of Software
75 原书第10章|Assertions
ethods that the developer guarantees will be true. This style is discussed in detail in Meyer 1988.
Briefly, "post-conditions" describe the side effects of an operation, the guaranteed outcome of calling a method. "Preconditions" are like the fine print on the contract, the conditions that must be satisfied in order for the post-condition guarantee to hold. Class invariants make assertions about the state of an object at the end of any operation. Invariants can also be declared for entire AGGREGATES, rigorously defining integrity rules.
All these assertions describe state, not procedures, so they are easier to analyze. Class invariant
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Domain-Driven Design Tackling Complexity in the Heart of Software/_epub-src/0321125215_ch10lev1sec3.html
EPUB SHA-256:3e81897e8809ae8135b32e0563f9858b3020c5f5128531655f6d8e3a21c679ce