Design Pattern
ELI5 — The Vibe Check
Design patterns are like recipe cards for solving common coding problems. Someone already figured out the best way to do it, wrote it down, and gave it a fancy name. Instead of reinventing the wheel, you just say 'use the Factory pattern' and everyone knows what you mean.
Real Talk
Design patterns are reusable solutions to commonly occurring problems in software design. Popularized by the Gang of Four book (1994), they are categorized as Creational (object creation), Structural (object composition), and Behavioral (object communication) patterns.
When You'll Hear This
"We should use a design pattern here to keep this clean." / "The Observer pattern is perfect for this event system."
Related Terms
Architecture
Architecture is the master blueprint for your app — like deciding whether to build a house, apartment block, or skyscraper before laying a single brick.
Factory Pattern
You want to create a 'notification' object but it might be an EmailNotification, SMSNotification, or PushNotification depending on user preferences.
Observer Pattern
Think of a newsletter. You (the publisher/subject) publish content. Your subscribers (observers) automatically get notified when new content arrives.
Singleton
Singleton is a pattern that ensures only ONE instance of a class exists in your entire app.
Strategy Pattern
You're writing a sorter and want to sort by price, name, or date depending on user choice.