Can you recognize the software design patterns in the real world? I ran into one yesterday hellip;
I called my colleague on the phone. His wife picked up the phone and said that Mike took their son to a soccer game. Then, she said, “I can give you his cell phone number rdquo;. These days people do not bother memorizing important phone numbers and just program them in their fancy cell phones. Besides, who said that the husband “s cell phone number is important?
Anyway, she continued, “I programmed his phone number under the title My Man rdquo;. The next minute I started explaining her what design patterns are (she is not a programmer).
“Jane, this is a clear example of a design pattern called Fa ccedil;ade. Programmers use this pattern to hide internal details of an object from the outside world. Just think about it, if for any reason you’ll decide to dump Mike for someone else, you “ll just need to change the phone number while keeping this My Man title. The only thing that mateers is that you always have MaMan. Implementation details do not matter rdquo;. When her husband came back from the soccer game, she proudly declared that she “s learned her first design pattern.
For more examples of the non-software design patterns, read this article by Michael Duell.
P.S. Mike and Jame lived happily ever after.