Sebastien Lachance

Law of Demeter

Talk only to your close friends. This is a object-oriented design guidelines. This law state that your object should know as little as possible of others objects. You may also know this by the name of “Principle of Least Knowledge”.

I have found that this guidelines has helped me a lot in my development. The more decoupled your object is, the easier it will be to make changes in your design.

I strongly suggest that you apply this law. You’ll thank me later.

Comments