I’m posting this here so I’ll remember it, and because it’s one of those simple things that people in software development often forget.  A method of an object should invoke only the methods of the following kinds of
objects:

  1. itself,
  2. its parameters,
  3. any objects it creates/instantiates;
  4. its direct component objects.

I read about the Law of Demeter at javaguy.org

Share and Enjoy:
  • del.icio.us
  • Reddit
  • Facebook
  • Identi.ca
  • TwitThis

Related posts:

  1. Inversion of Control in Python
  2. AgilePakistan.org
  3. Explain your commits completely
  4. Quotes

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Search