Design Principles
Identify the aspects of your application that vary and separate them from what stays the same.
- always try to separate the aspects that vary in your code.
- in another way to think about this is to take the parts that vary and encapsulate them.
- so you can alter or extend the parts that vary without effecting those that not changing.
Program to an interface, not an implementation
- rely on interfaces rather than implementing concrete classes.