
Design patterns emerged (roughly) 30 years ago.
And yet, many people believe they are as relevant today as they've always been.
A thread



This thread is about software design, not UI design.
Everything in the code is design. From details such as variable names to more architectural issues.






There are others, but you can find the most famous patterns in the book:
"Design Patterns: Elements of Reusable Object-Oriented Software" [GoF book].
Examples: facade, adapter, command, ...
What are the main advantages of design patterns?
Let's talk about 4 of them.

Examples: facade, adapter, command, ...

Let's talk about 4 of them.


In a team familiar with patterns, design discussions become very productive.
Can you imagine an architect that doesn't use "room patterns" such as bedroom or kitchen?
Patterns allow you to pack a lot of info in short sentences.

For instance, the "State" pattern shows how the "Open-Closed Principle" makes the addition of new states easier.


We must avoid overengineering and follow the rules of simple design, refactoring continuously.
When a pattern solves a *real* problem that we have, then we can use the pattern as a guide in the refactoring process.

If the patterns are obvious in our code (that is, if the code *evokes* the patterns, whether using the pattern names or not), then the readers that know the patterns will easily understand our intent.