Granular Interfaces – How Much OO Is Practical?
The ideas of cohesion and coupling point us to paths that either place functionality in smaller or larger classes. We discuss granular interfaces in this episode as an introduction to those “right-sizing” discussions. Not all OO designs are created equal. Granular Interfaces – Bricks or Sand The best example I have come across in considering how to approach our design’s granularity is comparing sand to bricks. We can construct a building by starting from sand, making blocks of concrete, and then moving on to the structure. However, it is easier when we can start from the blocks or bricks. The Lego Example We can similarly look at the children’s toy Lego bricks. There are various sizes of bricks available. Therefore,... Read more