Clean Architecture: A Craftsman's Guide to Software Structure and Design
Rate it:
Open Preview
6%
Flag icon
The measure of design quality is simply the measure of the effort required to meet the needs of the customer. If that effort is low, and stays low throughout the lifetime of the system, the design is good. If that effort grows with each new release, the design is bad. It’s as simple as that.
9%
Flag icon
Structured programming imposes discipline on direct transfer of control.
9%
Flag icon
Object-oriented programming imposes discipline on indirect transfer of control.
9%
Flag icon
Functional programming imposes discipline upon assignment.
12%
Flag icon
Some folks fall back on three magic words to explain the nature of OO: encapsulation, inheritance, and polymorphism. The implication is that OO is the proper admixture of these three things, or at least that an OO language must support these three things.
13%
Flag icon
OO languages may not have given us polymorphism, but they have made it much safer and much more convenient.
16%
Flag icon
SEGREGATION OF MUTABILITY One of the most common compromises in regard to immutability is to segregate the application, or the services within the application, into mutable and immutable components.
16%
Flag icon
Event sourcing is a strategy wherein we store the transactions, but not the state. When state is required, we simply apply all the transactions from the beginning of time.
16%
Flag icon
Structured programming is discipline imposed upon direct transfer of control. • Object-oriented programming is discipline imposed upon indirect transfer of control. • Functional programming is discipline imposed upon variable assignment.
17%
Flag icon
SRP: The Single Responsibility Principle An active corollary to Conway’s law: The best structure for a software system is heavily influenced by the social structure of the organization that uses it so that each software module has one, and only one, reason to change. • OCP: The Open-Closed Principle Bertrand Meyer made this principle famous in the 1980s. The gist is that for software systems to be easy to change, they must be designed to allow the behavior of those systems to be changed by adding new code, rather than changing existing code. • LSP: The Liskov Substitution Principle Barbara ...more
17%
Flag icon
For example, Agile Software Development, Principles, Patterns, and Practices, Robert C. Martin, Prentice Hall, 2002, http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod, and https://en.wikipedia.org/wiki/SOLID_(object-oriented_design) (or just google SOLID).
17%
Flag icon
A module should be responsible to one, and only one, user or stakeholder.
18%
Flag icon
SYMPTOM 1: ACCIDENTAL DUPLICATION
18%
Flag icon
This class violates the SRP because those three methods are responsible to three very different actors.
18%
Flag icon
SYMPTOM 2: MERGES
18%
Flag icon
Two different developers, possibly from two different teams, check out the Employee class and begin to make changes. Unfortunately their changes collide. The result is a merge.
19%
Flag icon
At the architectural level, it becomes the Axis of Change responsible for the creation of Architectural Boundaries.
20%
Flag icon
Architects separate functionality based on how, why, and when it changes, and then organize that separated functionality into a hierarchy of components.
20%
Flag icon
DIRECTIONAL CONTROL
20%
Flag icon
Much of the complexity in that diagram was intended to make sure that the dependencies between the components pointed in the correct direction.
20%
Flag icon
INFORMATION HIDING
20%
Flag icon
The goal is to make the system easy to extend without incurring a high impact of change. This goal is accomplished by partitioning the system into components, and arranging those components into a dependency hierarchy that protects higher-level components from changes in lower-level components.
21%
Flag icon
The LSP can, and should, be extended to the level of architecture. A simple violation of substitutability, can cause a system’s architecture to be polluted with a significant amount of extra mechanisms.
22%
Flag icon
CONCLUSION The lesson here is that depending on something that carries baggage that you don’t need can cause you troubles that you didn’t expect.
22%
Flag icon
The Dependency Inversion Principle (DIP) tells us that the most flexible systems are those in which source code dependencies refer only to abstractions, not to concretions.
22%
Flag icon
STABLE ABSTRACTIONS