Clean Architecture: A Craftsman's Guide to Software Structure and Design
Rate it:
Open Preview
3%
Flag icon
The obvious appeal of architecture is structure, and structure is something that dominates the paradigms and discussions of software development—components, classes, functions, modules, layers, and services, micro or macro.
4%
Flag icon
Software may be such stuff as dreams are made on, but it runs in the physical world.
4%
Flag icon
Architecture represents the significant design decisions that shape a system, where significant is measured by cost of change. —Grady Booch
4%
Flag icon
How do we reduce future development effort and cost without crystal balls and time machines?
4%
Flag icon
Architecture is the decisions that you wish you could get right early in a project, but that you are not necessarily more likely to get them right than any other. —Ralph Johnson
4%
Flag icon
we operate with incomplete knowledge,
4%
Flag icon
Architecture is a hypothesis, that needs to be proven by implementation and measurement. —Tom Gilb
4%
Flag icon
To walk this path requires care and attention, thought and observation, practice and principle. This might at first sound slow, but it’s all in the way that you walk. The only way to go fast, is to go well. —Robert C. Martin
4%
Flag icon
Enjoy the journey. —Kevlin...
This highlight has been truncated due to consecutive passage length restrictions.
4%
Flag icon
The architecture rules are the same!
4%
Flag icon
the rules of software architecture are independent of every other variable.
5%
Flag icon
True—and yet the code is still just an assemblage of sequence, selection, and iteration, just as it was back in the 1960s and 1950s.
5%
Flag icon
Getting software right is hard.
6%
Flag icon
when you get software right, something magical happens: You don’t need hordes of programmers to keep it working. You don’t need massive requirements documents and huge issue tracking systems. You don’t need global cube farms and 24/7 programming.
6%
Flag icon
When software is done right, it requires a fraction of the human resources to create and maintain. Changes are simple and rapid. Defects are few and far between. Effort is minimized, and functionality and flexibility are maximized.
6%
Flag icon
The goal of software architecture is to minimize the human resources required to build and maintain the required system.
6%
Flag icon
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.
7%
Flag icon
Modern developers are in a similar race, and exhibit a similar overconfidence. Oh, they don’t sleep—far from it. Most modern developers work their butts off. But a part of their brain does sleep—the part that knows that good, clean, well-designed code matters.
7%
Flag icon
The only way to go fast, is to go well.
7%
Flag icon
The only way to reverse the decline in productivity and the increase in cost is to get the developers to stop thinking like the overconfident Hare and start taking responsibility for the mess that they’ve made.
7%
Flag icon
Their overconfidence will drive the redesign into the same mess as the original project.
8%
Flag icon
Every software system provides two different values to the stakeholders: behavior and structure.
8%
Flag icon
Therefore architectures should be as shape agnostic are practical.
8%
Flag icon
Is it more important for the software system to work, or is it more important for the software system to be easy to change?
9%
Flag icon
Effective software development teams tackle that struggle head on. They unabashedly squabble with all the other stakeholders as equals.
9%
Flag icon
In 1938, Alan Turing laid the foundations of what was to become computer programming. He was not the first to conceive of a programmable machine, but he was the first to understand that programs were simply data. By 1945, Turing was writing real programs on real
9%
Flag icon
structured programming, object-orient programming, and functional programming.
9%
Flag icon
Object-oriented programming imposes discipline on indirect transfer of control.
10%
Flag icon
The three paradigms together remove goto statements, function pointers, and assignment. Is there anything left to take away? Probably not.
10%
Flag icon
Notice how well those three align with the three big concerns of architecture: function, separation of components, and data management.
10%
Flag icon
Dijkstra concluded that the intellectual challenge of programming was greater than the intellectual challenge of theoretical physics.
11%
Flag icon
mathematical proofs are not the only strategy for proving something correct. Another highly successful strategy is the scientific method.
11%
Flag icon
Science is fundamentally different from mathematics, in that scientific theories and laws cannot be proven correct.
11%
Flag icon
That is the nature of scientific theories and laws: They are falsifiable but not provable.
11%
Flag icon
Science does not work by proving statements true, but rather by proving statements false.
11%
Flag icon
mathematics is the discipline of proving provable statements true. Science, in contrast, is the discipline of proving provable statements false.
11%
Flag icon
Dijkstra once said, “Testing shows the presence, not the absence, of bugs.”
11%
Flag icon
Rather, software is like a science. We show correctness by failing to prove incorrectness, despite our best efforts.
11%
Flag icon
Software architects strive to define modules, components, and services that are easily falsifiable (testable).
12%
Flag icon
Java and C# simply abolished the header/implementation split altogether, thereby weakening encapsulation even more. In these languages, it is impossible to separate the declaration and definition of a class.
14%
Flag icon
pointers to functions are dangerous.
14%
Flag icon
OO allows the plugin architecture to be used anywhere, for anything.
14%
Flag icon
software architects working in systems written in OO languages have absolute control over the direction of all source code dependencies in the system. They are not constrained to align those dependencies with the flow of control. No matter which module does the calling and which module is called, the software architect can point the source code dependency in either direction.
14%
Flag icon
What can you do with that power? As an example, you can rearrange the source code dependencies of your system so that the database and the user interface (UI) depend on the business rules (Figure 5.3), rather than the other way around. Figure 5.3 The database and the user interface depend on the business rules This means that the UI and the database can be plugins to the business rules. It means that the source code of the business rules never mentions the UI or the database.
14%
Flag icon
the business rules, the UI, and the database can be compiled into three separate components or deployment units (e.g., jar files, DLLs, or Gem files)
15%
Flag icon
the modules in your system can be deployed independently, then they can be developed independently by different teams. That’s independent developability.
15%
Flag icon
Variables in functional languages do not vary.
15%
Flag icon
All race conditions, deadlock conditions, and concurrent update problems are due to mutable variables.
16%
Flag icon
The point is that well-structured applications will be segregated into those components that do not mutate variables and those that do.
16%
Flag icon
Architects would be wise to push as much processing as possible into the immutable components, and to drive as much code as possible out of those components that must allow mutation.
« Prev 1 3 9