I want to know when should developers read and learn about design patterns? Is it in junior, senior, or beyond senior level?
This question is very fuzzy one for me.
So why would you spend time learning them? Design patterns are a toolkit of tried and tested solutions to common problems in software design. Even if you never encounter these problems, knowing patterns is still useful because it teaches you how to solve all sorts of problems using principles of object-oriented design.
Design patterns are high-level answers to problems that we as software engineers encounter frequently. It isn't code — I repeat, IT IS NOT CODE. It's akin to explaining how to approach these issues and come up with a solution.
Most of the time, the design pattern is used when it is clear that the developer needs its flexibility. Each design pattern has its own approach. The strategies present in each design pattern are therefore original and are never the same from one design pattern to another.
At JetBrains Academy, you can get an introduction to design patterns and learn five types of the most common creational patterns in just 1 hour.
Early on, you should have a passive knowledge of design patterns. That is, you should know about the most common design patterns that they exist, but you should not try to use them actively. Since most design patterns have to do with class design, you should have a comprehension of classes and program structure before you learn design patterns.
The danger when learning design pattern is that you want to use them actively, even if they are not the right tool for the job. If all you have is a hammer, everything looks like a nail. Postpone the usage of design patterns until you hit a problem which you recognize from a design pattern.
I'd say that you can start reading about them once you've grasped the concepts of object oriented programming.
Head First Design Patterns is a great first book for learning about design patterns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With