Dan Kuida

28%
Flag icon
The class is the type. It is not part of any interesting hierarchy, and it isn’t used polymorphically by implementing an interface. • The client cares about the implementation, perhaps as a way of choosing a STRATEGY. • All of the attributes of the object are available to the client, so that no object creation gets nested inside the constructor exposed to the client. • The construction is not complicated. • A public constructor must follow the same rules as a FACTORY: It must be an atomic operation that satisfies all invariants of the created object.
Domain-Driven Design: Tackling Complexity in the Heart of Software
Rate this book
Clear rating
Open Preview