Showing posts with label codequality. Show all posts
Showing posts with label codequality. Show all posts

Monday, October 26, 2015

Where's the law?

If you would like to describe Law of Demeter in one sentence, it would go like that: “talk only with your (closest) friends”.
In full form it tells that a method of particular object can call only methods that belong to:
  • the same object,
  • any object that is an attribute of this object,
  • any object that was passed as a method’s parameter
  • any object that was locally created.