Law Of Demeter

The Law of Demeter (LoD) in a design principle, presented in Northeastern University at the end of 1987. The LoD aims to reduce coupling between classes, it says, “a module should not know about the innards of the objects it manipulates” (Robert C. Martin, The Clean Coder). The philosophy around LoD, is avoid getting deep in objects details and inner’s structure so we scale down the dependencies level.

The LoD projection on Object-oriented Programming, says if we have a class C and a function f, then f Continue reading →