Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we learn where and when to apply particular Design Patterns?

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 ?

like image 595
Rachel Avatar asked Dec 26 '09 16:12

Rachel


People also ask

How do you know when to use 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).

Why do you need to know and apply design patterns?

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.


1 Answers

Refactor to patterns, rather than code to patterns is the general advice.

like image 129
Finglas Avatar answered Sep 29 '22 13:09

Finglas