Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm planning to read a book to gain some good knowledge of design patterns, why we use them, how to apply them and how to choose the best design for my software.

So I have two books on my desk right now: "Head First Design Patterns" and "Design Patterns: Elements of Reusable Object-Oriented Software".

Which one do you think I should read as my first book about design patterns?

share|improve this question
9  
Please do not use multiple "!!!" or "???". It's silly. One is enough. – S.Lott Mar 24 '11 at 10:40

migrated from stackoverflow.com Mar 24 '11 at 8:19

5 Answers

up vote 24 down vote accepted

I would suggest you to start with "Head First Design Patterns" It explains the design patterns better because of the simple lucid language and lot of pictures and lot of practical day to scenarios. Make no mistake to discard it as an light weight start up to design patterns because even if pictures and stories it really goes to the crux of each pattern and how the pattern fits in to the SOLID principle of. Ofcourse once through with "Head First Design Patterns" you can go for "Gang of four" which is the ultimate bible as far as design patterns are concerned.

share|improve this answer
1  
Indeed. Whilst Design Patterns: Elements of Reusable Object-Oriented Software is the definitive design patterns book, reading Head First Design Patterns first will help you to understand Design Patterns: Elements of Reusable Object-Oriented Software better. – CraigTP Mar 24 '11 at 12:33
1  
Consider also that the design of the GOF book is constructed like a cookbook: although it's possible to read it all through, you don't have to. – vstrien Mar 24 '11 at 14:30
2  
The Head First book is a tutorial on design patterns. The GoF book is like a dictionary. From my experience, every person that I recommended the Head First book to after they've been struggling with GoF has absolutely loved it. After reading Head First they were then able to go back and understand GoF. – Dunk Mar 24 '11 at 15:44
1  
""Gang of four" which is the ultimate bible as far as design patterns are concerned" - I have to take some issue with that statement. GoF is a small book with only a handful of patterns. Not even remotely "the ultimate bible." Fowler has a lot more published work on patterns, and there's several other authors with great pattern books too. – qes Mar 24 '11 at 19:10

The "Gang of four" (Design Patterns: Elements of Reusable Object-Oriented Software) book is a classic. You should study it at some point anyway. Note that the programming languages used are mostly C++ and sometimes Smalltalk.

AFAIK "Head First Design Patters" is in Java. Some people believe that the teaching technique (using pictures, etc) used inside this book helps you to understand patterns (their use cases, etc.) better. Others on the other hand don't like this structure. If you are familiar with Java perhaps it is better to start with the "Head First Design Patterns".

share|improve this answer
HFDP uses Java for the examples, but you don't need in-depth Java knowledge to use it, it's reasonably language agnostic. Its major benefit over the GoF book is that it's designed as a tutorial and teaching aid, rather than a reference work. Eventually you'll likely want to have the GoF book, but I'd not want to have it as an introductory text. – jwenting Mar 24 '11 at 19:44

Definitely go with "Design Patterns: Elements of Reusable Object-Oriented Software", it's the original book that defined the entire concept. Some people think it has been taken too far, but if design patterns is what you want to learn about, reading the Gang of Four is a good first step.

share|improve this answer
no, not a good first step. It's a good book to have as a reference, and for in-depth study, not as an introduction to the topic. – jwenting Mar 24 '11 at 19:44

I don't know "Head first design patterns", but I always keep my copy of the GoF book (Design patterns: Elements of Reusable Object-Oriented Software) on my shelf for reference. As far as I know this is the best book on Design patterns that is out there.

However I am not so sure, if this book will help you, if you need to know in an abstract sense, what design patterns are, and why to use them. The best part of the book is an in depth reference of many important patterns including many variations. This is the best part of the book in my opinion, because it shows you many things you can change on a given pattern, which I would usually not have remembered on my own.

share|improve this answer

Design Patterns Explained: A New Perspective on Object-Oriented Design is a nice introduction to design patterns.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.