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