System Design Notebook / 09

Design Principles

SOLID, and the question underneath it

SOLID is the answer. The question underneath it is which changes a design makes cheap and which it makes expensive, so each letter is taken back to the coupling it is really about, including where two of them disagree.

pages
42
sections
25
editions
Reading, Print, Tablet

Sign in to read it

Sign in and the whole notebook opens, all three editions with it. An account is what makes a download belong to someone.

Sign in with GitHub or Google

Start reading

How to use this book

Start reading

What is inside

Every section, and every one of them opens in the browser. Nothing here is hidden: if a section you need is not in this list, the notebook is not the right one and you should not spend a week on it.

  1. How to use this book
  2. The whole picture on one page
  3. 1The requirement: a change that should have been small
  4. 2Cohesion and coupling: the older, better words
  5. 3Separation of concerns, and where these principles live
  6. 4S: one reason to change
  7. 5S, refined: responsibility means an actor
  8. 6O: change by adding, not by editing
  9. 7O: Meyer's version and Martin's are not the same
  10. 8L: what Liskov actually said
  11. 9L: the four rules, and the square
  12. 10I: the interface that carries what you do not use
  13. 11D: point the dependency at what changes least
  14. 12When two principles disagree
  15. 13OCP against YAGNI: the abstraction you did not need
  16. 14SRP against DRY: the duplication you should keep
  17. 15The smell catalogue: what a violation looks like in a diff
  18. 16SOLID outside objects
  19. 17The critique: is SOLID still right?
  20. 18The delivery script
  21. 19Whiteboard: refactoring live
  22. 20Follow-up question bank
  23. Appendix A. The sources, and what each one actually says
  24. Appendix B. The one-page summary
  25. Appendix C. Glossary
  26. Appendix D. Self-test

How to read it

Read with a pen. Every notebook opens with a question to answer before you start and asks you to redo the answer at the end, and the margin in the Print edition exists so you have somewhere to be wrong first. The Tablet edition is 16:9 with vector text, so note apps draw on it rather than treating it as a photograph.

more notebooks