Princple of Least Knowledge (Law of Demeter)
A method M in an object O can call on:
Liskov Substitution Principle
Subtypes should be substitutable for their base types
Encapsulate what varies
Favour composition over inheritance
- delegate the implementation of a behaviour to composed class
loosely-coupled design
Hoolywood principle: don’t call us, we’ll call you
OCP
SRP
classes should only have one reason to change = high cohesion
Program to an interface (super-type) and not to an implementation
Depend upon abstractions. Do not depend on create classes