Head First Design Patterns


Head First Design Patterns is the title of a good book that can be used to learn design patterns. It’s not a reference book designed for those who already know their design patterns. If you’re new to design patterns, this book is a good choice. If you are an experienced OO designer and you are looking for a reference book, try Design Patterns: Elements of Reusable Object-Oriented Software. There is actually a second edition of this book coming out shortly.

What are design patterns? If you are familiar with some of the features of object-oriented programming and are ready to tackle design patterns, you might have a look at the book called Head First Design Patterns published by O’Reilly and written by Eric Freeman, Elisabeth Robson, Bert Bates, and Kathy Sierra. It was released in October 2004. The code examples in the book are written for Java 8. If you are a C# programmer like me then you’ll do just fine with this book because C# is very similar to Java. In fact, you might say that C# inherits from Java, or that C# is Java.

Here are the Table of Contents of the book Head First Design Patterns.

  1. Welcome to Design Patterns: an introduction (Strategy Pattern)
  2. Keeping your Objects in the know: the Observer Pattern
  3. Decorating Objects: the Decorator Pattern
  4. Baking with OO goodness: the Factory Pattern
  5. One of a Kind Objects: the Singleton Pattern
  6. Encapsulating Invocation: the Command Pattern
  7. Being Adaptive: the Adapter and Facade Patterns
  8. Encapsulating Algorithms: the Template Method Pattern
  9. Well-managed Collections: the Iterator and Composite Patterns
  10. The State of Things: the State Pattern
  11. Controlling Object Access: the Proxy Pattern
  12. Patterns of Patterns: Compound Patterns
  13. Patterns in the Real World: Better Living with Patterns
  14. Appendix: Leftover Patterns

YouTube Videos

YouTube videos by Christopher Okhravi. In these videos Christopher follows the examples in the Head First book.

  1. Strategy Pattern – Design Patterns (ep 1)
  2. Observer Pattern – Design Patterns (ep 2)
  3. Decorator Pattern – Design Patterns (ep 3)
  4. Factory Method Pattern – Design Patterns (ep 4)
  5. Abstract Factory Pattern – Design Patterns (ep 5)
  6. Singleton Pattern – Design Patterns (ep 6)
  7. Command Pattern – Design Patterns (ep 7)
  8. Adapter Pattern – Design Patterns (ep 8)
  9. Facade Pattern – Design Patterns (ep 9)
  10. Proxy Pattern – Design Patterns (ep 10)
  11. Bridge Pattern – Design Patterns (ep 11)
  12. Structural Patterns (comparison) – Design Patterns (ep 12)
  13. Template Method Pattern – Design Patterns (ep 13)
  14. Composite Pattern – Design Patterns (ep 14)
  15. Difference Between Composite and Decorator Pattern – Design Patterns (ep 15)
  16. Iterator Pattern – Design Patterns (ep 16)
  17. State Pattern – Design Patterns (ep 17)
  18. Null Object Pattern – Design Patterns (ep 18)

Derek Banas also has a series of very popular videos on Design Patterns. The turorials were done back in 2012 but are still relevent today. Derek’s focus is more on the definition of the pattern and on the Java code itself.

  1. Design Patterns Video Tutorial
  2. Design Patterns Video Tutorial 2
  3. Strategy Design Pattern
  4. Observer Design Pattern
  5. Factory Design Pattern
  6. Abstract Factory Design Pattern
  7. Singleton Design Pattern Tutorial
  8. Builder Design Pattern
  9. Prototype Design Pattern Tutorial
  10. Java Reflection API Tutorial (not a design pattern)
  11. Decorator Design Pattern
  12. Command Design Pattern
  13. Adapter Design Pattern
  14. Facade Design Pattern
  15. Bridge Design Pattern
  16. Template Method Design Pattern
  17. Iterator Design Pattern
  18. Composite Design Pattern
  19. Flyweight Design Pattern
  20. State Design Pattern
  21. Proxy Design Pattern Tutorial
  22. Chain of Responsibility Design Pattern
  23. Interpreter Design Pattern
  24. Mediator Design Pattern
  25. Memento Design Pattern
  26. Visitor Design Pattern

There are a lot of videos in these lists but don’t be intimidated. Watch them slowly and carefully, one-by-one as you wish. For the Derek Banas videos I suggest watching videos one and two as they are intended to be a review of basic object oriented programming. If they are too simple for you just move on to the specific design patters. You could at the top and work you way down. The strategy Design Pattern is a good place to start because it is not too difficult. The Adapter and Facade patterns are also not too difficult to understand.