Sebastien Lachance

Learning new things everyday

Book review : Head First Design Patterns

My first of 12 books I’ve committed myself to read : Head First Design Patterns.

This is the second time I’ve read that book, and quite enjoyed it again. As the title say, it’s a book about design patterns. The patterns explored are :

  • Strategy
  • Observer
  • Decorator
  • Simple Factory
  • Factory Method
  • Abstract Factory
  • Singleton
  • Command
  • Adapter
  • Template Method
  • Iterator
  • Composite
  • State
  • Proxy
  • Model-View-Controller

Every pattern listed here is explained with an example of the real world. Not exactly as real as ours but it’s different from what we’ve seen on other books.

If you’ve never read a Head First book, you will be surprised. The book is focused on interaction with the reader. At the end of some chapters, there is crosswords for us to do, forcing us to re-read the entire chapter trying to find the answers. There is also some place where you need to answers questions or writing class diagrams. You need to think a lot and it’s a very good way to learn fast. The paragraphs are short and jokes are scattered all over the place. A very nice feature is that you have handwritten text everywhere, pointing out important stuff. If you happen to see incoherence in the text, be prepared to have a section clarifying all that (with a conversation between two patterns or a reader’s question).

But it’s not all about design patterns. They go through the basics and principles of Object-Oriented programming such as the Dependency Inversion Principle.

Well the book is about learning differently. And ca be a quick-start for beginners.

Have I learned something off this book? Of course! I have a lot more knowledge about design patterns now, even if I had previously read the Gang of Four pattern book. I can explain each one of the design patterns explored and recognize it in other’s code. I recommend it seriously to anyone who wants to start applying design patterns and learning about Object-Oriented principles.

Here is a nice preview of the book : Chapter 3 : Decorator.

Comments