DEV Community

Discussion on: Design patterns. How do you select yours?

Collapse
 
johwacode profile image
joh

I think there are very different types patterns that you could use in various situations.
For starters there are dp that are nearly always a good idea such as facades or adapters.
Then there are patterns that fit a special model-structure as containers, fabrics etc, you'll recognize them when they fit your project.
Then there are patterns you just are aware of because you just used them for any recent project, maybe per accident, maybe someone told you to, maybe you read about them - if they were helpfully you'll try to reuse them, hopefully they're fitting again.
At last there are dozens of patterns you're not even aware of. While experimenting you could try to do stuff with them, but you usually don't try to pick one and make your project fit to it.