Head First Design Patterns

Product Description
You’re not alone. At any given moment, somewhere in the world someone struggles with the same software design problems you have. You know you don’t want to reinvent the wheel (or worse, a flat tire), so you look to Design Patterns–the lessons learned by those who’ve faced the same problems. With Design Patterns, you get to take advantage of the best practices and experience of others, so that you can spend your time on… something else. Something more challeng… More >>

Head First Design Patterns

Comments

  1. At first I didn’t understand how they would apply the Head First formula to design patterns. I’d read two head first before this one and I was impressed with those so I took a look and now, not only is it clear how they approached the topic, it’s also clear to me that this is the best way to learn design patterns.

    The Gang of Four book laid out the basics. Here is the pattern, here are some examples. The head first book goes a lot further. They show you good and bad examples of the pattern. They give solid reasoning behind the pattern. It’s great.

    There are times when I would look at a piece of code and have the author explain to me that it was based on one of the GoF patterns. I would come away thinking, if that’s the pattern, then that pattern sucks. It’s clear that patterns can be misapplied. So understanding the the how design patterns are applied, and how they are commonly applied wrongly, or to an extreme, is just as important as understanding the basic mechanics of the pattern itself.

    The example code is in Java, but I think this is an ideal book for anyone passionate about patterns.
    Rating: 5 / 5

  2. E. Wuehler says:

    Usually when reading through a book or article on design patterns I’d have to occasionally stick myself in the eye with something just to make sure I was paying attention. Not with this book. Odd as it may sound, this book makes learning about design patterns fun.

    The first thing you notice is the pages are not paragraph after paragraph of information. There isn’t a single page that doesn’t contain a doodle, a sidebar, a picture, or something different. While at times it can be a little distracting, it’s in a good way (at least I don’t have to poke myself with something sharp anymore).

    The chapters cover various design patterns and along the way have exercises such as crossword puzzles or match games to test your understanding. The answers are also included at the end of the chapters – so you don’t need to purchase a “Teacher’s Edition” on the black market. =)

    Other books on design patterns are saying, “Buehler… Buehler… Buehler…” while this book is on the float belting out “Shake it up, baby!”
    Rating: 5 / 5

  3. Unlike a lot of people, I don’t care much for this book’s ‘irreverent’ sytle. I think it masks some shortcoming in the examples it uses. But once you get past that, this is still the best introduction to object-oriented programming that I have read.

    HFDP is not just about design patterns. It’s a great introduction to object-oriented programming. The book does a great job of explaining the benefits of OOP over traditional procedural programming, and it explains OOP very well in terms of the most commonly used design patterns.

    Now for the bad news. The examples are rather lightweight. They do a pretty good job of illustrating the concepts presented, but the code is in no way real-world. For example, if you are looking for which pattern to use to organize a UI (the ‘Mediator’, ‘State’, and ‘Composite’ patterns), with sample code, you won’t find it here. The patterns are discussed, but they are used to create quacking ducks (really).

    While that’s by-and-large a shortcoming of the book, the code is so simple that non-Java programmers (like me) should have no problem using the book. The code samples are very basic, and should translate with little difficulty into .NET languages such as C# and VB.

    One other item of note–this book contains a pretty good chapter on Model-View-Controller architecture, which seems to bedevil a lot of people. If you can get a handle on MVC, then you can pretty much do OOP.

    In short, this is probably the book I would recommend as an intro to OOP. If you are under the age of 30, you will probably like the examples of quacking duck simulators and java-enabled gumball machines. For everybody else–it’s worth looking past this book’s insufferable cuteness if you are getting started in OOP.
    Rating: 4 / 5

  4. Head first books tend to polarize readers I feel: you either love the unique methodology of the books or you hate it. They are extremely visual, often hilarious, and require you to do various activities to engage more fully with the content. This is similar to the traditional teaching methdology in mathematics: motivating example -> theory -> example -> your turn. This I find as a teacher, is a strong (pedagogical approach) methodology, particularly if you can make it fun, interesting and engaging. I, like the masses, like Head First Books (I have Servlets & JSP as well as this one. I have also read tracts of Java).

    Anyway, that aside, the book provides a solid inroduction to selected design patterns- it doesn’t cover all the GoF patterns. It contains (in order)

    * Strategy

    * Observer

    * Decorator

    * Factory

    * Singleton

    * Command

    * Adapter and Facade

    * Template

    * Iterator and Composite

    * State

    * Proxy

    * Compound Patterns

    * Living better with Patterns

    If you have no experience with patterns, I recommend this as a good Intro to the MasterWork by the GoF-> Design Patterns, Elements of reusuable Oject-oriented software IBSN: 0201633612. From personal experience, I found after reading the Head First pattern, I could pick up the GoF book, look at the same pattern and understand it with virtually no problems.

    I have no hesitation recommending this book, if you like the Head First way, championed by Kathy Sierra. If you don’t like apparent frivolity (I say apparent because there is an ulterior motive to this frivolity-> engagement. Basically, cognitive psychology says the more deeply you engage, the more you learn, retain and understand), then maybe this isn’t for you.

    Slight criticism-> you may notice this book uses some ‘old’ java syntax like using iterators for collections like arrayLists, rather than the new for (object j: collection) and no generics in sight in declaring such arrayLists: they use ArrayList name=new ArrayList(), not ArrayListname=new ArrayList(); But these are ‘very’ minor criticisms. Likewise, it’s usefulness as a comprehensive reference like the GoF book may be questionable. But then, if you approach it as a learning tool and a means to mastery rather than a reference, this shouldn’t be an issue (you can always resell it when you’re done!).

    Anyway, in conclusion, two thumbs up. Read it, do the work, enjoy it and you’ll be well on the way to the GoF’s MasterWork in design patterns. All the 5 star reviews don’t lie! This is a five star book.

    As an aside I recommend, in addition to this and GoF, reading Streamlined Object Modeling- patterns, rules and implementation- ISBN: 0130668397 for higher level OO system design (OO system architecture). And just so you don’t fell excluded from the vernacular (and didn’t know this): GoF=Gang of Four (Gamma, Helm, Johnson, Vlissides)
    Rating: 5 / 5

  5. I am quite impressed with this book’s explanations of design patterns. The authors start each chapter explaining a problem and then showing how a given implementation or two isn’t flexible. Then the text presents a design pattern and shows how to use it and how it solves certain issues. Along the way, the reader is given general design ideas to keep in mind while architecting or refactoring a system.

    Because key concepts are repeated throughout the book using different phrasing and examples, I found learning/reviewing each pattern to be straightforward and easy. I haven’t used Java since ’98, but with C# skills I found the code examples fairly simple to understand.

    Also note that this book doesn’t explain in detail all the patterns explicated in the Gamma et al. text. Instead, you will learn the Strategy, Observer, Decorator, Factory, Singleton, Command, Adaptor, Facade, Template Method, Iterator, Composite, State, and Proxy patterns will full explanations and code examples. Other patterns (e.g., Bridge, Builder, Chain of Responsibility, etc.) receive only a brief overview in the back of the book. The authors feel that those patterns aren’t used as often and consequently necessitate less coverage.

    If you’re looking for no-nonsense writing that delivers design pattern facts in a most direct manner, then choose the original Gang of Four Design Patterns book instead. But for a much friendlier introduction and explanation of patterns, pick up Head First Design Patterns right away and use Design Patterns by Gamma et al. as a reference. Highly recommended.

    Rating: 5 / 5

Speak Your Mind

*