Clean Architecture: A Craftsman's Guide to Software Structure and Design

Book description

Building upon the success of best-sellers The Clean Coder and Clean Code, legendary software craftsman Robert C. "Uncle Bob" Martin shows how to bring greater professionalism and discipline to application architecture and design.

As with his other books, Martin’s Clean Architecture doesn’t merely present multiple choices and options, and say "use your best judgment": it tells you what choices to make, and why those choices are critical to your success. Martin offers direct, no-nonsense answers to key architecture and design questions like:

  • What are the best high level structures for different kinds of applications, including web, database, thick-client, console, and embedded apps?

  • What are the core principles of software architecture?

  • What is the role of the architect, and what is he/she really trying to achieve?

  • What are the core principles of software design?

  • How do designs and architectures go wrong, and what can you do about it?

  • What are the disciplines and practices of professional architects and designers?

Clean Architecture is essential reading for every software architect, systems analyst, system designer, and software manager -- and for any programmer who aspires to these roles or is impacted by their work.

.

Table of contents

  1. Cover Page
  2. Series Page
  3. Title Page
  4. Copyright Page
  5. Dedication
  6. Contents
  7. Foreword
  8. Preface
  9. Acknowledgments
  10. About the Author
  11. PART I Introduction
    1. Chapter 1 What Is Design and Architecture?
      1. The Goal?
      2. Case Study
      3. Conclusion
    2. Chapter 2 A Tale of Two Values
      1. Behavior
      2. Architecture
      3. The Greater Value
      4. Eisenhower’s Matrix
      5. Fight for the Architecture
  12. PART II Starting with the Bricks: Programming Paradigms
    1. Chapter 3 Paradigm Overview
      1. Structured Programming
      2. Object-Oriented Programming
      3. Functional Programming
      4. Food for Thought
      5. Conclusion
    2. Chapter 4 Structured Programming
      1. Proof
      2. A Harmful Proclamation
      3. Functional Decomposition
      4. No Formal Proofs
      5. Science to the Rescue
      6. Tests
      7. Conclusion
    3. Chapter 5 Object-Oriented Programming
      1. Encapsulation?
      2. Inheritance?
      3. Polymorphism?
      4. Conclusion
    4. Chapter 6 Functional Programming
      1. Squares of Integers
      2. Immutability and Architecture
      3. Segregation of Mutability
      4. Event Sourcing
      5. Conclusion
  13. PART III Design Principles
    1. Chapter 7 SRP: The Single Responsibility Principle
      1. Symptom 1: Accidental Duplication
      2. Symptom 2: Merges
      3. Solutions
      4. Conclusion
    2. Chapter 8 OCP: The Open-Closed Principle
      1. A Thought Experiment
      2. Directional Control
      3. Information Hiding
      4. Conclusion
    3. Chapter 9 LSP: The Liskov Substitution Principle
      1. Guiding the Use of Inheritance
      2. The Square/Rectangle Problem
      3. LSP and Architecture
      4. Example LSP Violation
      5. Conclusion
    4. Chapter 10 ISP: The Interface Segregation Principle
      1. ISP and Language
      2. ISP and Architecture
      3. Conclusion
    5. Chapter 11 DIP: The Dependency Inversion Principle
      1. Stable Abstractions
      2. Factories
      3. Concrete Components
      4. Conclusion
  14. PART IV Component Principles
    1. Chapter 12 Components
      1. A Brief History of Components
      2. Relocatability
      3. Linkers
      4. Conclusion
    2. Chapter 13 Component Cohesion
      1. The Reuse/Release Equivalence Principle
      2. The Common Closure Principle
      3. The Common Reuse Principle
      4. The Tension Diagram for Component Cohesion
      5. Conclusion
    3. Chapter 14 Component Coupling
      1. The Acyclic Dependencies Principle
      2. Top-Down Design
      3. The Stable Dependencies Principle
      4. The Stable Abstractions Principle
      5. Conclusion
  15. PART V Architecture
    1. Chapter 15 What Is Architecture?
      1. Development
      2. Deployment
      3. Operation
      4. Maintenance
      5. Keeping Options Open
      6. Device Independence
      7. Junk Mail
      8. Physical Addressing
      9. Conclusion
    2. Chapter 16 Independence
      1. Use Cases
      2. Operation
      3. Development
      4. Deployment
      5. Leaving Options Open
      6. Decoupling Layers
      7. Decoupling Use Cases
      8. Decoupling Mode
      9. Independent Develop-ability
      10. Independent Deployability
      11. Duplication
      12. Decoupling Modes (Again)
      13. Conclusion
    3. Chapter 17 Boundaries: Drawing Lines
      1. A Couple of Sad Stories
      2. FitNesse
      3. Which Lines Do You Draw, and When Do You Draw Them?
      4. What About Input and Output?
      5. Plugin Architecture
      6. The Plugin Argument
      7. Conclusion
    4. Chapter 18 Boundary Anatomy
      1. Boundary Crossing
      2. The Dreaded Monolith
      3. Deployment Components
      4. Threads
      5. Local Processes
      6. Services
      7. Conclusion
    5. Chapter 19 Policy and Level
      1. Level
      2. Conclusion
    6. Chapter 20 Business Rules
      1. Entities
      2. Use Cases
      3. Request and Response Models
      4. Conclusion
    7. Chapter 21 Screaming Architecture
      1. The Theme of an Architecture
      2. The Purpose of an Architecture
      3. But What About the Web?
      4. Frameworks Are Tools, Not Ways of Life
      5. Testable Architectures
      6. Conclusion
    8. Chapter 22 The Clean Architecture
      1. The Dependency Rule
      2. A Typical Scenario
      3. Conclusion
    9. Chapter 23 Presenters and Humble Objects
      1. The Humble Object Pattern
      2. Presenters and Views
      3. Testing and Architecture
      4. Database Gateways
      5. Data Mappers
      6. Service Listeners
      7. Conclusion
    10. Chapter 24 Partial Boundaries
      1. Skip the Last Step
      2. One-Dimensional Boundaries
      3. Facades
      4. Conclusion
    11. Chapter 25 Layers and Boundaries
      1. Hunt the Wumpus
      2. Clean Architecture?
      3. Crossing the Streams
      4. Splitting the Streams
      5. Conclusion
    12. Chapter 26 The Main Component
      1. The Ultimate Detail
      2. Conclusion
    13. Chapter 27 Services: Great and Small
      1. Service Architecture?
      2. Service Benefits?
      3. The Kitty Problem
      4. Objects to the Rescue
      5. Component-Based Services
      6. Cross-Cutting Concerns
      7. Conclusion
    14. Chapter 28 The Test Boundary
      1. Tests as System Components
      2. Design for Testability
      3. The Testing API
      4. Conclusion
    15. Chapter 29 Clean Embedded Architecture
      1. App-titude Test
      2. The Target-Hardware Bottleneck
      3. Conclusion
  16. PART VI Details
    1. Chapter 30 The Database Is a Detail
      1. Relational Databases
      2. Why Are Database Systems So Prevalent?
      3. What If There Were No Disk?
      4. Details
      5. But What about Performance?
      6. Anecdote
      7. Conclusion
    2. Chapter 31 The Web Is a Detail
      1. The Endless Pendulum
      2. The Upshot
      3. Conclusion
    3. Chapter 32 Frameworks Are Details
      1. Framework Authors
      2. Asymmetric Marriage
      3. The Risks
      4. The Solution
      5. I Now Pronounce You …
      6. Conclusion
    4. Chapter 33 Case Study: Video Sales
      1. The Product
      2. Use Case Analysis
      3. Component Architecture
      4. Dependency Management
      5. Conclusion
    5. Chapter 34 The Missing Chapter
      1. Package by Layer
      2. Package by Feature
      3. Ports and Adapters
      4. Package by Component
      5. The Devil Is in the Implementation Details
      6. Organization versus Encapsulation
      7. Other Decoupling Modes
      8. Conclusion: The Missing Advice
  17. Afterword
  18. PART VII Appendix
    1. Appendix A Architecture Archaeology
  19. Index

Product information

  • Title: Clean Architecture: A Craftsman's Guide to Software Structure and Design
  • Author(s): Robert C. Martin
  • Release date: September 2017
  • Publisher(s): Pearson
  • ISBN: 9780134494272