Tag: design-principle
All the articles with the tag "design-principle".
OOP Design Principles Part 5 — Composition over Inheritance
Exploring GoF's advice to favor composition over inheritance. We cover what inheritance breaks, how to achieve the same functionality with composition,...
OOP Design Principles Part 4 — TDA, Law of Demeter, CQS
Covering the rules of communication between objects. We explore TDA — don't ask for state, tell the object what to do; the Law of Demeter — don't talk...
OOP Design Principles Part 3 — DIP
Covering the final SOLID principle: DIP. We explore what it means to invert the direction of dependencies, and how it differs from Spring's DI, through...
OOP Design Principles Part 2 — LSP and ISP
Covering the third and fourth principles of SOLID. We examine through code whether subclasses can truly substitute their parents, and how small an...
OOP Design Principles Part 1 — SRP and OCP
Covering the first two principles of SOLID: SRP and OCP. We explore through code what it means to limit a class to a single reason for change and to...




