By Rob Park on
Sunday, March 22, 2009
Simple requires discipline and courage.
Just implementing some feature without tests and without really considering the class responsibilities involved… that’s easy… well for a little while anyway. However, being disciplined to test-drive your change in and then refactor mercilessly for single responsibility, removing duplication, etc that’s how you keep your design simple.
Just exposing your class’s data and then reaching into it further, violating the Law of Demeter, that’s easy. However, being disciplined to recognize you have some inappropriate touching going on and instead at least encapsulating that into tested methods will help keep your design simple.
Even then, if you do recognize for example a class is too big, just taking some of it (hopefully related pieces) and putting them in depe
Read More »