Nice Bunnies, Good Bunnies

Mark Bernstein, Refactoring: Taming The Bunnies:

If bunny methods repeatedly need to get stuff from the mother object, consider passing the information they need as arguments. If you have too many arguments, make an argument object. If a method on bunny A needs to talk to some other bunny, pass the bunny as an argument. The point here is to unravel the tangled strands of yarn and to knit up your raveled sleeve of care.

19 Mar 2014

Archive