Law of DemeterThe Law of Demeter, also known as the don't talk to strangers principle of low coupling in software design:
The Law of Demeter was originally formulated as a style rule for designing object-oriented systems. "Only talk to your immediate friends" is the motto. The style rule was discovered at Northeastern University in the fall of 1987 by Ian Holland.
A more general formulation of the Law of Demeter is: Each unit should have only limited knowledge about other units: only units "closely" related to the current unit. Or: Each unit should only talk to its friends; Don't talk to strangers.
Basically it can be formulated like this:
• Wrote irmen at 00:06 (edited 2×, last on 30 Nov 2006) | read 278× | Add commentA method of an object should use only the following kinds of objects:
- itself
- its parameters
- any objects it creates/instantiates
- its direct component objects
1BahOB <a href="http://zcpurhltphij.com/">zcpurhltphij</a>, xoevuiqncybj, [link=http://cuzmasxifpmx.com/]cuzmasxifpmx[/link], http://skqglqqefusf.com/
• wrote uefyzhxrfw on 23 May 2008, 23:16