📄️ Adapter
The Adapter Pattern is a structural design pattern that allows objects with incompatible interfaces to work together. It acts as a bridge between two incompatible interfaces by wrapping an existing class with a new interface that clients expect.
📄️ Bridge
GoldenGate
📄️ Composite
The Forest of Components
📄️ Decorator
📄️ Façade
Imagine you're building a smart home automation system that controls various devices such as lights, thermostats, and security cameras. Each device has its own complex interface and set of commands. Without a Façade Pattern, managing these devices directly in your code can quickly become overwhelming. For instance, turning on the lights might involve sending commands to different light bulbs, adjusting their brightness, and checking if any motion sensors need to be activated—all of which requires intricate coordination.
📄️ Flyweight
Imagine you are developing a video game inspired by the popular anime "Konosuba". In this game, players control multiple main characters like Kazuma, Aqua, Darkness, and Megumin. As your game gains more popularity you decide to add new characters and enemies like Yun yun, Eris, Wiz, etc. When you release this new update you start receiving too many tickets from the users saying that the game stopped working or that it just crashed.
📄️ Proxy
Understanding the Proxy Pattern: A Tale of Wizards and Spellbooks