When building software, we often find ourselves coming across similar challenges on a regular basis. How can we avoid creating unnecessary instances of a particular class? How can we control how a class is instantiated? How might we separate the way a specific decision is made from the rest of an algorithm? These are just a few examples of the types of problems software developers regularly face and that are potentially solved through the application of common design patterns.
So, let's begin by understanding what design patterns are. Design patterns collect common vocabulary, patterns, and best practices for solving some of the common software development challenges. Common design patterns will typically include descriptions of the problem they aim to solve, the motivations behind how they solve the problem, and some guidance for when you may...