Tag
#structural-patterns
7posts

SP7 - Proxy - Learn Design Pattern From Simple Things
The boss blocks social media so employees stay focused. That's exactly how the Proxy pattern works - controlling access between objects.

SP6 - Object Pool - Learn Design Pattern From Simple Things
Manufacturing planes is expensive, but raw parts are reused from a pool. That's the Object Pool pattern - reduce creation cost with smart reuse.

SP5 - Facade - Learn Design Pattern From Simple Things
Many departments, one entrance. The Facade pattern simplifies complex systems by exposing only what you need. Learn it from simple everyday things.

SP4 - Mixer - Learn Design Pattern From Simple Things
You are a dog farm owner who manages the properties of all dog breeds. The number of crossbred dogs is increasing every day because of the emergence of new breeds!

SP3 - Tree - Learn Design Pattern From Simple Things
You need to store the leaves hierarchically, sometimes you will count the leaves. Tree will be a suitable structure to facilitate leaf counting.

SP2 - Decorator & Function Decorator & Closure - Learn Design Pattern From Simple Things
Ice cream gets better with extra flavor - and code gets richer with the Decorator pattern. Learn closures, function decorators, and object wrapping.

SP1 - Adapter - Learn Design Pattern From Simple Things
Having many devices that need to connect to your Macbook leads to too many cables. You need a tool to replace all those cables.