Friday, September 19, 2008

Tip about encapsulation

I like this simple and practical Kent Beck's tip about encapsulation (from Fowler's Getter Erradicator article):

...always beware of cases where some code invokes more than one method on the same object...


It's not a rule but I think it can be considered one more smell to have in mind.

0 comments: