Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
feint878ythat means use them,record where they work good .and then if I meet the same scence, just Use the pattern again. if one pattern work bad
i can try others until find a suitable pattern -
@feint ya. And we always need to keep on refactoring so always start with writing a test case.
-
I think this is a common issue with design patterns, and personally I would suggest looking at other books / videos online if this one is leaving you confused... Alot of design pattern books give pretty bad examples and make it much harder to think when you would need to use them. Personally i feel the best way is to find something that shows you code for a requirement and the problems that come of it without a design pattern, then shows you how to implement the pattern... I found pluralsight to be most useful here
-
arekxv10548yI personally could never read the Gang of 4 book, too technical and would require people which already faced those problems in the past. Head First: Design Patterns is the book I would recommend. :)
-
viking817428yTry reversing it. Look at your code, try match it to a pattern. If you are close to it, you'll be able to grasp the concept.
It's hard, without experience, to read a pattern description and find it's use. With all in life, things must be tried to understand.
Related Rants
I am reading a book that intoduce 23 design patterns. I can understand what they say ,But when start to code,I find that I not sure where should I Use thoes patterns。dose it come from experience? I cant get the point.
undefined
design pattern