ABSTRACT

Underlying almost all design patterns is a wish for maintainability and flexibility. The objective of this chapter is to introduce two qualities that are relatively easy to judge or measure in our code: coupling and cohesion. These two qualities are interesting because if I achieve high cohesion and low coupling then maintainability and reliability increase. I will also present a concrete rule, law of Demeter, that aims at getting low coupling.