Domain-Driven Design: Tackling Complexity in the Heart of Software
Rate it:
Open Preview
47%
Flag icon
in the discussion of ASSERTIONS.
47%
Flag icon
When the side effects of operations are only defined implicitly by their implementation, designs with a lot of delegation become a tangle of cause and effect.
47%
Flag icon
The value of encapsulation is lost.
47%
Flag icon
INTENTION-REVEALING INTERFACES carry us part of the way there, but informal suggestions of intentions are not always enough.
47%
Flag icon
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.
47%
Flag icon
If you trust the guarantee of a post-condition, you don’t have to worry about how a method works.
47%
Flag icon
If ASSERTIONS cannot be coded directly in your programming language, write automated unit tests for them.
47%
Flag icon
Seek models with coherent sets of concepts,
47%
Flag icon
Because ASSERTIONS are all in terms of states, rather than procedures, they make tests easy to write.
47%
Flag icon
The test setup puts the preconditions in place; then, after execution, the test checks to see if the post-conditions hold.
47%
Flag icon
Clearly stated in...
This highlight has been truncated due to consecutive passage length restrictions.
47%
Flag icon
it is important to find models that make sense to people as well as satisfying the needs of the application.
48%
Flag icon
and modifying arguments is a particularly risky kind of side effect anyway.
48%
Flag icon
they made a discovery. It turns out that there was a compelling reason the original designers made it this way. At the end, the program reports the list of unmixed paints that were added. After all, the ultimate purpose of this application is to help a user figure out which paints to put into a mixture. So, to make the volume model logically consistent would make it unsuitable for its application requirements. There seems to be a dilemma. Are we stuck with documenting the weird post-condition and trying to compensate with good communication? Not everything in this world is intuitive, and ...more
48%
Flag icon
Let’s look for a new model.
48%
Flag icon
These are oversimplifications that don’t work well as general rules.
48%
Flag icon
On the other hand, breaking down classes and methods can pointlessly complicate the client, forcing client objects to understand how tiny pieces fit together.
48%
Flag icon
Because of this underlying consistency, when we find a model that resonates with some part of the domain, it is more likely to be consistent with other parts that we discover later.
48%
Flag icon
This is one reason why repeated refactoring eventually leads to suppleness.
48%
Flag icon
The twin fundamentals of high cohesion and low coupling play a role in design at all scales, from individual methods up through classes and MODULES to large-scale structures
48%
Flag icon
Find the conceptually meaningful unit of functionality, and the resulting design will be both flexible and understandable.
48%
Flag icon
By the same token, there are areas in any domain where detail isn’t interesting to the kind of people the software serves.
48%
Flag icon
Clumping things that don’t need to be dissected or rearranged avoids clutter and makes it easier to see the elements that really are meant to recombine.
48%
Flag icon
Observe the axes of change and stability through successive refactorings
48%
Flag icon
CONCEPTUAL CONTOURS that explain these shearing patterns.
48%
Flag icon
UBIQUITOUS LANGUAGE,
48%
Flag icon
But it may never emerge from technically oriented refactoring; it emerges from refactoring toward deeper insight.
1 4 6 Next »