Posts

Showing posts with the label seam model

Legacy code concepts II: the Seam Model

Hi audience, According to my last post, there are some important concepts related to legacy code that it is worth writing down and, therefore, have a clearer picture. Sensing and separation were two of them, both concepts tightly related to breaking dependencies. Moving forward, in line with those, I’m going to write about the Seam Model, introduced by Michael C. Feathers in his book Working Effectively with Legacy Code . The Seam Model The Seam Model is a convenient name to represent the ways by which we can perform tests without producing code changes in order to get a class into a test harness. A Seam Quoting the author, “A seam is a place where you can alter behaviour in your program without editing that place” Important to highlight: alter behaviour without editing . So how can we change behaviour without changing the code? We can actually do it in different ways or manners so far: Seam types Preprocessing seam : used in languages that allow preprocessing, such as C+...