Tuesday, June 05, 2007

Law of Demeter and TDD

I have found the Law of Demeter most useful in TDD practice.  This way we can create Mock classes in a better way.

The Law of Demeter (LoD), or Principle of Least Knowledge is a design guideline for developing software, particularly object-oriented programs. The guideline was invented at Northeastern University in the fall of 1987,
and can be succinctly summarized as “Only talk to your immediate
friends.” The fundamental notion is that a given object should assume
as little as possible about the structure or properties of anything
else (including its subcomponents).

Tushar Joshi, Nagpur

Technorati Tags: , , , , , ,

Powered by ScribeFire.

No comments:

Post a Comment

Thanks for visiting the blog and reading my blog post. Please post your opinion / suggestion for me here.