 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Program to an
interface, not an
|
|
|
implementation
|
|
|
| • |
Favor
composition over inheritance
|
|
|
|
» |
Ideally, get all
the functionality you need by
|
|
|
composing
existing components
|
|
|
|
» |
In practice,
available components aren’t rich
|
|
|
enough
|
|
|
|
» |
Reuse by
inheritance easier to create new
|
|
|
components that
can be composed of old ones
|