Strive for loosely coupled designs between objects that interact.
Loosely coupled designs allow us to build flexible OO systems that can handle change because they minimize the interdependency between objects.
Enjoy
Marcos Carvalho
Strive for loosely coupled designs between objects that interact.
Loosely coupled designs allow us to build flexible OO systems that can handle change because they minimize the interdependency between objects.
Enjoy
Marcos Carvalho
Favor composition over inheritance.
Create system using composition gives you a lot more flexibility. Not only does it let you encapsulate a family of algorithms into their own set of classes, but it also lets you change behavior at runtime.
Enjoy
Marcos Carvalho
Program to an interface, not an implementation.
Enjoy
Marcos Carvalho
Identify the aspects of your application that vary and separate them from what stays the same.
Take the parts that vary and encapsulate them, so that later you can alter or extend the parts that vary without affecting those that don't.
Enjoy
Marcos Carvalho
Classes should be open for extension, but closed for modification.
Designs that are resilient to change and flexible enough to take on new functionality to meet changing requirements.
Enjoy
Marcos Carvalho