Link Details

Link 97336 thumbnail
User 111696 avatar

By bloid
via googletesting.blogspot.com
Published: Jul 23 2008 / 14:01

Every time I see Law of Demeter violation I imagine a haystack where the code is desperately trying to locate the needle.
  • 13
  • 3
  • 881
  • 281

Comments

Add your comment
User 281687 avatar

paul_houle replied ago:

0 votes Vote down Vote up Reply

About the "Context" object, I've definitely seen applications that build elaborate Rube Goldberg contraptions to distribute resources to the places that need them. Good use of Singletons, and static scopes can help, but if you're passing something (a "Context" or an "Engine") through hundreds of method calls to get access to a resource in many places, you've got a problem.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.