I was just going through Design Patterns Questions on Stackoverflow and everyone mentioned about GoF- Design Pattern
book and Head First Design Patterns
book to learn them.
My questions is how can we learn where
and when
can we apply particular Design Pattern
.
Are there any books or online resources which imparts this knowledge or what steps we need to follow in making our decision of where
and when
we should use particular Design Patterns
?
If you know the design patterns, then when you are working through a design, and particular part of a system requires something that fits a design pattern you have, then use it. Don't try to fit a system round a design pattern, fit design patterns in to your system (where they fit).
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.
Refactor to patterns, rather than code to patterns is the general advice.
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