Home - Java

Product Details

Binding:

Kindle Edition

EAN:
Label:

O'Reilly Media

Feature:
Publisher:

O'Reilly Media

Studio:

O'Reilly Media

Editorial Reviews

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 challenging. Something more complex. Something more fun.

You want to learn about the patterns that matter--why to use them, when to use them, how to use them (and when NOT to use them). But you don't just want to see how patterns look in a book, you want to know how they look "in the wild". In their native environment. In other words, in real world applications. You also want to learn how patterns are used in the Java API, and how to exploit Java's built-in pattern support in your own code.

You want to learn the real OO design principles and why everything your boss told you about inheritance might be wrong (and what to do instead). You want to learn how those principles will help the next time you're up a creek without a design pattern.

Most importantly, you want to learn the "secret language" of Design Patterns so that you can hold your own with your co-worker (and impress cocktail party guests) when he casually mentions his stunningly clever use of Command, Facade, Proxy, and Factory in between sips of a martini. You'll easily counter with your deep understanding of why Singleton isn't as simple as it sounds, how the Factory is so often misunderstood, or on the real relationship between Decorator, Facade and Adapter.

With Head First Design Patterns, you'll avoid the embarrassment of thinking Decorator is something from the "Trading Spaces" show. Best of all, in a way that won't put you to sleep! We think your time is too important (and too short) to spend it struggling with academic texts.

If you've read a Head First book, you know what to expect--a visually rich format designed for the way your brain works. Using the latest research in neurobiology, cognitive science, and learning theory, Head First Design Patterns will load patterns into your brain in a way that sticks. In a way that lets you put them to work immediately. In a way that makes you better at solving software design problems, and better at speaking the language of patterns with others on your team.

Customer Reviews

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.
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.
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!"
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 ArrayList<type>name=new ArrayList<type>(); 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)
Soon after the Gang of Four published their book about basics of Design Patterns, I bought the book and read it very carefully. About that time I was busy doing other engineering work so I could not put the patterns in immediate use in some practical project. Maybe that contributed to my troubles understanding it.

While reading the GoF book I found it very complicated to memorize the pattern. After reading so many books on programming, so many technical and other books every year in several decades in the past, I thought I have a very strong and sound learning techniques from books. But GoF book simply was out of my reach from some reason. The problem was this: when reading about a pattern, I could understand every sentence, every paragraph, and most of the time the whole chapter about that particular pattern; but it seemed hard to keep in mind that pattern, and soon afterwards, I could hardly implement the pattern in my programs. It was as if you are keeping the slippery fish in your hands, and just when you think you caught it, it slips from your hands back into the water.

Finally after this book (it is still in reading) I found what I was searching for:
1) the crystal sound explanation of Design Patterns – why you use any of them;
2) what is important and what is not important in pattern. Actually the authors of HeadFirst does not speak much about it explicitly, but when they explain the pattern you do not have to think what I was constantly thinking when reading GoF book: what is the most important part of the pattern and which part of pattern can be changed for specific use. With HeadFirst book you get the right measure of all parts of pattern explanation.
3) I could memorize, reproduce and implement the patterns with ease!

Second, the book is astonishingly new, refreshing and perfect in the presentation sense. It is full of pictures and with hand-written comments. Everybody who was ever involved in the presentation material would tell how hard is to achieve such a great presentation level with so many diverse visual effects and putting them in perfect shape like this book achieves. I think this was the problem for one of the very rare reviewers of this book to give this beautiful book such a bad grade. I think he was wrong to falling under the first-impression opinion and misjudged the book greatly.

The truth is the HeadFirst Design Patterns deserves the highest possible marks – I do not give it only 5 stars, but I give it the Oscar for Design Patterns. And that is final even before I read the last page of it. Authors of this book, if you ever read this comment here is the message for you: my sincere complements for your hard work, you has been terrifically good, and I mean it!
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.

So far i bought about 30 computer books from amazon. This is the BEST!!!!!! First book that explains something real good but doesn't assume that you (the reader) actualy understood it so they re-explain it and attack the problem from a deferent point of view. I bought steven mezger's design patterns with c# book and read it cover to cover. It doesn't even come close to this piece of art although this is wrriten for java programers. I read "decorator" pattern in mezger's book more than 5 times and didn't actualy understand it. First time i read it in this book and i feel like a design patterns master! I'm thinking a lot about their teaching style. Its briliant! If you realy want to understand design patterns even if you are a c# or c++ programmer, By this book!
Cheers!
Adi Barda
I got involved with design patterns in 1995 with the GoF book. I have learned them and used them on numerous consulting projects, and I feel I understand them pretty well. Recently I was asked to teach a Design Patterns course. The course material was excellent and very comprehensive, but I felt I needed an complementary approach for teaching that was a little lighter than the student manual. I picked up the Head First Design Patterns book, and started reading it on the flight to where I was teaching. The time flew by, and so did the pages. When I got off the plane I had read almost 300 pages. It is a really easy read. I was seriously impressed with the quality of the book's coverage, and its really excellent examples to motivate why and how each pattern can be useful. As an object modeler and architect I see way too many examples of developers using either the wrong pattern, or using a pattern just to say "I used the Strategy pattern!". The GoF book is the "bible" on DPs, but this Head First book is a superb introduction for beginners, and for veterans like me to learn something new. At the end of that DP class, several students shared that they had tried to get through the GoF book but just couldn't stay with it. After I showed them several of the examples in this book, they said they were eager to read the GoF book to get more depth.
I know what you're thinking: "This can't be serious", "What's with the clip art", or maybe "This isn't the GoF book!" but dispite the silly cover, this is one of the best and most informative books on computer programming I have ever read.
If you're looking to refine your development skills but just don't have the patience for a BS in Computer Science, this book is just the thing for you. HFIDP covers the very abstract and difficult to understand concept of Design Patterns in an engaging and fun way. By employing several different styles of teaching and visualization (including challenging questions, real world examples, and humour that isn't overly cheesy) it's nearly impossible not to learn something. There is even a section on how to retain information while reading!
This is a Java oriented book, but I have found it to be very useful for ActionScript 2.0 programming as well.
Before buying this book, I read "C# 3.0 Design Patterns" (C3DP) as it used my preferred language.That book was not as clear as I needed, so I considered other options.

I purchased Head First Design Patterns based on reviews at this site.
For the most part, I had no problem understanding the Java, and the
implementation of most patterns into C# is straight forward.
The largest deficiency of this book is that, unlike C3DP which gives
equal treatment to each pattern, HFDP gives provides only summary
descriptions of 9 of the 23 patterns (2 pages for each pattern.)
This kind of terseness for so many patterns is not what I was looking for.
One star lost. For most other patterns. the presentation is crystal clear.

There was a problem with the explanation of the difference between Abstract Factory
and Factory Method patterns. An elaborate Pizza-related example was used
in both patterns but then the discussion of the pattern differences completely
ignored the example and used a completely different set of terms that confused
me more that helped.

The other problem is the amount of Java-specific code.
The 70 pages devoted to the Proxy pattern had maybe 2 pages I could use
and 68 that I don't think I could translate into C#.
Also, the compound pattern chapter delved into the MVC pattern in such a way
that it was hard to see the interplay of patterns.
What is especially good for Java programmers was not so good for me and C#.
Another star lost.

Only with reservations Would I recommend this book to other C# programmers.
For maybe 16 of the patterns (excluding the 9 summarized and Proxy),which the author says are the most commonly used,readers will gain a greater understanding compared to that gained from the C3DP book. The crossword puzzles are a nice change of pace for a technical book. Still, I need more. I have not not read the GoF book, but maybe I will now.
I have to admit: I was skeptical, at first. I stumbled on a Head First book a year or two ago, flipped through the pages, and put it back on the shelf: it seemed too simplistic for me.

A few weeks ago I was browsing computer books at a local Borders and stumbled on a lineup of several "Head First" titles. "If O'Reilly keeps publishing this stuff, someone must be buying it", I thought. I picked up one of them, started reading... I could not put the book down: it is rare when a computer book is so much fun and yet so informative and mature!

This book possess the magic of making you to learn without you really noticing it. Yeah, I know, "No pain, no gain." Well, somehow the authors manage to keep you engaged, even with such an abstract material. What I am trying to say is that you don't feel like you need to concentrate on the reading because all the action keeps you focused. In each chapter the authors in a quite unimposing and subtle manner introduce a problem, so you almost don't see it coming. Most importantly, you don't feel that you are studying, but still, you are learning!

Authors by the means of visualization and conversations of quite a few characters -- the Master and the Student, the Guru and the Developer, and others -- make you learn the material almost "by the way". Why? I think because these characters represent familiar voices in your head that sound surprised, sarcastic, annoyed, excited, and frustrated when you are trying to digest new material. They force you to look at the problems and patterns in many different ways, and this is the essence of internalizing. The questions and answers are flying right in front of you, and they are neither boring nor trivial, so you are not falling asleep. Pictures make it even more real, and plenty of coded examples add necessary precision. Most importantly, using this style of writing the authors increase internalization of somewhat complex and abstract material much faster than others that I am familiar with.

The "Head First: Design Patterns" book covers the familiar GOF patterns, but unlike many of the patterns books, it does not have a separate condensed patterns catalog. The patterns appear as natural solutions to natural problems. What's remarkable is that they seem just one of the courses in this feast of object-oriented thinking. Indeed, this book talks about the wisdom of object-oriented design as about the design patterns themselves. This feels natural: the patterns do represent some of the best practices in the object-oriented design.

The only complaint I have is about the Appendix: the authors cramped in almost as many design patterns in its 20 pages as they did in the preceding 600. I understand that to cover the rest of the patterns could take another book and another year, but I'd rather wait for the sequel.

I believe that both experienced and novice readers will benefit from this enjoyable and engaging book, but you definitely will be more perceptive to the wisdom of this writing if you have matured through developing, maintaining, and extending of object-oriented systems. All in all, I love this book and can't wait to start reading another "Head First" pearl.
If your previous attempts to learn design patterns have induced bouts of narcolepsy, Head First has a better idea. Using their now familiar and very effective teaching style, the design patterns are presented with fun and humor. Off-beat coding examples in Java are used to illustrate the problems that the patterns are to solve and the pattern-influenced solutions. For those of us who are micro-confined, the C# version is available from the website.

Rather than teach just the design patterns, the underlying object-oriented principles are taught, for example "Favor composition over inheritance". Not only does this reinforce the understanding of the pattern, but also it better enables the developer to apply the pattern appropriately. Emphasis is also placed in understanding the differences between similar patterns or patterns that support similar principles.

The depth of coverage that the book delivers requires that the focus is on the most frequently used patterns with the rest of the GOF patterns being briefly mentioned in the appendix.

When I first saw the book, I was curious about how this would work out. After all, everything that I had seen on design patterns had not been the least bit amusing, but not to fear the Head First team has created a real gem. Maybe the Head First crew could tackle UML or Test Driven Development for us and make them fun to learn, also. We can only hope.
At first glance, the book looks weird, with child-like drawings, quasi hand-written explanations and 'bad' jokes. But all of these are actually very helpful in communicating intent. For example in larger code listings, you can safely ignore most of the code and just pay attention to the 'manual' notes which show very clearly what is happening and why. They're much easier to pick up than embedded comments in the code would be. Interviews with patterns, which also appear regularly, emphasize the finer points and subtle differences between different patterns.

The book claims Java knowledge to be a requirement. I found this is mostly not the case. There are some Java-dependent implementations here and there (the implementation of the Proxy pattern comes to mind as something that is too Java-centric to be useful in other languages, though the purpose and principles of the pattern are still clear). Most of the code is very readable if you just know how to interpret curly-brace syntax and are familiar with basic object terminology.

Downsides are:
- relative lack of 'real' examples of where a given pattern could be used. If you have any experience programming, you'll probably recognize as you read about some patterns that you've already used them (or something similar to them), or at least identify places where you wished you had done so. But it wouldn't hurt to have some more realistic examples than the duck simulator.
- I found the exercises to be mostly too simple to bother with.
- The leftover patterns get a treatment which I think is too short to be useful. I'd have preferred having 4 pages per leftover pattern, or two pages but more tightly packed than they are now.
I have to admit, I was prepared to dislike this book. It has a sassy attitude, the cartoony style, and a page layout more like a pinball machine than a textbook. "It could be worse," I told myself, "it could have been in color."

OK, I'm wrong a lot. This actually does have technical content in it. Good technical content, better than lots of other books. For example, they not only deal with Singleton and thread saftey, they talk about Java 1.5 and synchronization. They even got the volatile declaration right! No, they don't explain it except to say that you need it, but at least it's there. The description of statically initialized singletons doesn't describe the circumstances where it may fail (in multiple classes with mutually dependent static initializers), but they mention static init. The machine control code used as an example couldn't restart after a power failure, but the pattern is handled well. And, on the whole, they handle other patterns with equal, pragmatic care.

There's a lot of blank space on most pages, so the 600-some read like less - a lot less. Cartoons, cartoony photos, and gratuitous thought balloons occupy most of most pages. It's consistent, though, and encodes information fairly clearly. I don't know their right names, but some characters recur throughout the book. There's the "Yeah, But" lady, who points out problems and inconsistencies. There's The Guru with her mystical pronunciamenti and her conversations with "Grasshopper." (Do these readers actually remember the Kung Fu TV series?) There's the "What If" lady and the Geek Guy. Another book might have sidebars of different sorts, but these characters each narrate one kind of point worth extra mention.

Example code is generally good. One problem with sample code is that students often get wrapped up in the synthetic problem being solved, and forget that the code is meant to illustrate some other point. These samples serve the structural purposes well enough, but will never be mistaken for serious applications.

Unfortunately, the fluffy format leaves about half of the GoF patterns to one- or two-page descriptions in an appendix. This includes some of my workhorses, like "Prototype" and "Chain of Responsibility", and an inadequate version of "Interpreter." Like so many other authors, they get caught up in the text-processing problems tangential to the pattern and ignore its real meaning: composition of complex actions from simpler ones.

I might actually recommend this for an undergrad course, at least as one among several texts. What content it has is good stuff, in a basic presentation, and a format suited to the Gameboy generation.

//wiredweird
I don't know Java and don't plan on learning it, other than just being able to decipher it. I am a Coldfusion MX developer learning how to use components in OO methodologies. From looking around the Internet I learned every detail about the basics of OO but still couldn't grasp the OO thinking. You can learn everything about OO and when you sit down to program you'll just draw a blank. Knowing OO won't make you an OO programmer, thinking in OO will.

That's where Head First Design Patterns comes in. I picked up this book in a store and thought a miracle had happened. Finally the resource I'd been looking for all my programming life!!! I bought it and read it over and over again all the time and each time I make another discovery. It's the most valuable book in my library and the most read.

You don't just learn patterns, you learn OO thinking. I highly recommend this for anyone trying to grasp OOP in any language. Go through it and do the examples in your programming language and you'll see the light. It'll all come together so fast and easy. It literally saved me months or years of self-study to get this stuff down. If you want to learn OOP then I suggest looking around the Internet, then when your ready to think in OO pick up this book.
This book combines good humors, great examples, and in-depth knowledge of Design Patterns in such a way that makes learning fun. Being in the entertainment technology industry, I am intrigued by the Hollywood Principle and the home theater Facade Pattern, to name a few. The understanding of Design Patterns not only helps us create reusable and maintainable quality software, but it also helps sharpen our problem-solving skills across all problem domains. This book is a must read for all computer professionals and students.
This is the first time ever I have written a review on any book,not because I am too arrogant or anything like that, just because i am lazy!!always thought there are already tons of reviews over there,probably doesn't need one more review like mine!! I just can't resist on writing one after i bought this book two days ago, and have kept on reading for two days. the reasons,

I have struggled for quite a while to have a grasp of what pattern are and then, above all, how to apply to my coding. I read original GOF books, well, I have to say, maybe too good to use in real life!! i read Martin fowler's book, examples just snippet.

every example in this book is put in context, and very well explained the upside and downside why the pattern should be used. I feel I am enlightened in design even before i finish the book. not kept in dark, or guess which pattern is better in my coding, now i understand, why which pattern is better.

I can't stand that some guys give this book one star,or three stars. I went out of my way to read their view, one guy compaint of no introdution to java as examples are written in java. My advice is this book is about design pattern, not about learn a certain language, by reading this book to learn java, u r missing the point!! another guy whinges this book does't look like a technical book, what's wrong with some jokes or cross words. u can read original GOF book, i really doubt how many people really understand what the book is talking about after the first one or two shots.

this book deserves 6 stars. i recommend anybody interested in design pattern should buy this book. conditions apply, except you are a guru in design, i mean a real guru, not somebody knowing tweaking code to get their goal!!

I mean, I agree that this book wouldn't exist if not for the GOF book, but seriously, I think these people have done such a better job of actually teaching and presenting the patterns to everyone that I think everyone should first read this book before they read the GOF book. Now, it's a different question whether you can stand the dull style of the GOF book after having read this awesome and fun to read book.
Disclaimer: I served as a technical reviewer for several chapters of this book.

Understanding design patterns and how they are used in developing an application is a critical skill. It is important that developers be able to make use of the same lexicon when discussing application architecture. Books like "Design Patterns" by Eric Gamma, et al (affectionately referred to as the Gang of Four, or GoF) do well to catalog design patterns and provide this lexicon but they are difficult to use as a guide to learning and understanding design patterns, especially for the less-experience developer. "Head First Design Patterns" provides the skills required to learn and understand what design patterns are and how to use them and does it in a fun, easy-to-read way.

Although this book does present many of the patterns found in the GoF book, it is not a design pattern catalog. Its real goal is to help the reader look at their applications in new ways to discover how design patterns can simplify their development efforts. Patterns are covered in great detail, some may say in almost too much detail, but the end result is a thorough understanding of the patterns under discussion as well as the whole reasoning behind using patterns in the first place.

Each pattern is discussed in a similar way. It generally starts with a programming problem that has been handed to the development team. They look at a typical, non-design pattern solution and point out the problems with this solution, usually involving issues with making future changes. The team then starts looking for alternate solutions and discovers a design pattern. The application is then refactored using the design pattern. Simplified UML diagrams and easy to follow Java programs are used throughout the book. All of this is done in an amusing way that will keep the reader interested and not distracted.

I can strongly recommend this book for any developer with a sense of humor who wishes to understand design patterns. Even if you are not a Java programmer, the programs are simple enough for any developer using an object oriented language to understand. The book does a great job of explaining object oriented design goals and showing how each pattern fits into those goals. You won't find a discussion of every design pattern known but you will find a highly instructive discussion of some of the most common patterns. Reading this book will provide you with the skills to understand design patterns and to understand why you should be using them.
I once heard about a school that was built but the landscaping was left until the following spring. This was so that they could mark the trails that the students left in the snow and put the pathways where people naturally went rather than force them to go to a predifined and septic grid.

That is essentially what this book is trying to do. Get you away from feet first mentallity of "just build the damn thing" and having software architected to mimic the natural patterns of how individuals think so that the proper design is molded and more effective before the first line of code is wrought.

With a great set of exercises and explanations, this is a keeper if your the lead architect or teaching about software architecture. The book makes you understand patterns and relay that to others.

Appeals to sofware architects and teachers/students.

Minor note - loose the low rent clip art on the cover.
First of all, I would like to thank the authors for writting this excellent book. Hats off to all of you, O'Reilly and Head First Team (for editing)!

I literally love this book. In fact, I kissed this book in front of my wife. :)

I like everything about this book from brain-friendly writting style coupled with sound OO principles to heart-touching examples. The impressing examples in this book are green in my heart.

I have read many books and articles on patterns and found them dry. Bascially, It was boring to learn patterns from windows/UI specific (including maze) examples.

I would like to make a point here about GoF Design Pattern book. It's a good reference book, but GoF MUST come up with second edition.

I humbly respect the great work of the authors and I request them to write more specialized books like this.
I had the DP course as part of my Masters program. To be honest, I slept through most of the classes, did'nt understand a thing that was in the Gof book, and somehow clawed my way through the programming assignments. I was surprised to get an A- in the course...my prof was very generous.
Then work happened, and I had to deal with interviews, real life situation where I wished I knew more about patterns, so that I could learn from generic solutions people developed already.
I got this book last month, have read through 2 chapters so far (I'm a very slow reader). It is one of the most entertaining Computer Science books I've read. It's fresh, and their technique should be patented. It's fun, and you remember what you read, because of so many diagrams, and the hands on exercises in the book which you should make a point of doing. One more suggestion, as long as you know any OO programming language, try out the sample Java code.
I am thoroughly enjoying this book.
At last I have finished reading Head First Design Patterns book. Below is my review of the book and why people in Java/J2EE or say Object Orient (domain) world should buy this as it's worth your money.

This book Covers 13-14 Patterns in quite detail as listed blow with good real life examples.
Patterns Covered -
Strategy, Observer,Decorating Objects, Factory Method, Singleton, Command Pattern, Adapter, Facade,
Template Method, Iterator, Composite, State, Proxy, Compound.

And some others in appendix like Bridge, Builder, Prototype, Mentor.

What is interesting about this book is its approach. When you start reading it doesn't feel in a way you are reading a technical book as it encourages more of interactions with the reader by asking question or having discussions with you or team members working on a scenario where the pattern will be used. For example it uses phrase "There are no dumb questions" to reply to doubts or questions you will come across with scenarios. Also covers step by step with Class diagrams and code snippets to stage until the pattern is defined with its pros and cons and then comparing wit other patterns if they come across similar to others. Also has cross word puzzle to test your brain, which is always handy along with scenario's to fill in once pattern is understood. Has lots of diagrams having flow of events in a scenario which really makes it easy to grasp it.

The most striking thing about this book is that how it is presented, because having knowledge in a domain is different from how you impart or present that knowledge to others and this is where this book fills this gap, which technical books seems to miss mostly. Also if you are using Java/J2EE for quite a while I will say, read this book as u might be learning more. But this is not the bible of patterns book, but seems to be more then sufficient if you want to start your journey in in this doamin. This book deserves to be on my bookshelf.

For more on this can be read on my blog <a href="http://vashistvishal.blogspot.com/2005/06/book-review-head-first-design-patterns.html">Book Review - Head First Design Patterns</a>
Picked up my copy of Head First Design Patterns today (I'd ordered it in a couple of weeks ago). So far I'm loving it.

I'd been eyeing this book off for a while since reading the sample chapter for this and for Head First Java. The presentation style looks like it should be childish and silly, but it is amazingly effective.

The sample chapter, for example, made me look at Decorator in a new light. I thought I knew how Decorator worked and what it could be used for, but the sample chapter offered new possibilities, particularly for decorating Command objects. In addition, it helped expose me to new ways to explain the pattern, which is always a good thing.

So, based on the sample, I made my decision to buy. I'm not looking to learn a heap from this book about design patterns themselves, but I fully expect to see a few new possibilities, plus some excellent ways to teach the patterns to others. So far, I'm two chapters in (which means I'm really three, as the sample chapter was chapter 3), and it's living up to my expectations - the introduction alone demonstrated the power of the Strategy pattern in a new way, and at a much finer level of granularity then I had previously thought of taking it to. Before reading this, I'd never considered using Strategy to share behaviour between subclasses, for example.

Take my advice: buy this book. Even if you're not a Java developer, pick it up anyway. Even if you think you know everything about patterns, buy this book. Even if you are one of the Gang of Four, buy this book - unless you're Erich Gamma, because then you helped review it, and so I presume you've already got a copy. :)
It's almost impossible to fail with this book. By just reading through (do not skip any sections, no matter how silly they look!), all WHY's/HOW's will be soaked into your brain automatically. I read most of Head First books(EJB/Servlet&JSP deserve 5 stars, AJAX -4.5, HTML-4), but this is the best by far.

You are wasting your time if you are still reading the reviews here.
Get It!!!
This book lays down the foundations of OO design that are vital to understand. Most importantly, it provides a foundation for the practice of OOD which is certain in extensible systems.

The book does an excellent work of explaining most of the patterns and general design. As always, Head First are funny (well in most cases) and will keep your attention on the most important issues.

Excellent Job! *****
Dror Guzman
One thing is for sure, when you pass this book in the store it will catch your attention (at least if your a male that is still breathing), however that is no way to judge a technical book. Checking out the back cover reveals a very different story - both Erich Gamma and Ward Cunningham appear to love the book, and what higher authority is there on Design Patterns? Anyway, it was enough to make me pick up the book. Inside you're going to find something very different from a computer text. What you're going to find is a completely different format created by Kathy Sierra and Bert Bates that uses conversation, graphic treatment, and even puzzles to help you learn. The book has more the appearance of, say, a graphic novel than your typical O'Reilly book. It also in places is quite funny in a "wink wink" techie way.

But can you learn from this or is it just a lightweight cartoon guide to design patterns? Actually, this is where I was surprised. This book takes design patterns very seriously, and on quite a few patterns it straightened up my view of them, and in a couple places totally changed what I thought the pattern was (the factory pattern is a good example). It also does something better than any other patterns book I've read, it links design patterns to the design principles they are based on. I have been exposed to all the principles, but I can't say I'd ever put together the big picture, and this book helped me do that.

I think best of all, this book is very approachable for intermediate programmers that know a little object oriented programming but are ready to really start thinking about objects. That doesn't describe me, but I wished I'd had this book a few years back when I was learning.

In sum, if you have an open mind and are looking for an excellent source of OO and Design Patterns material, and don't actually mind having your brain tickled while you learn, then this format really works. I'm looking forward to more of these kinds of books (I've also read the Servlets book in the series).
This book is definitely not the patterns Nirvana, and it may not make you the patterns guru, but it sure is a great book, extremely well written to welcome the beginner to the world of patterns. I first tried reading the GOF book (Eric Gamma, John Vslides...) - certainly a bible but a heavy read and especially so if you are just getting started with design patterns. Not this one! It really introduces some of the basic concepts very well to lead you to understand how the patterns came into being and then goes forward to drill the pattern into your head. The new approach to technical writing is fantastic and does the job. Once I master this book and practice the patterns, I am sure I will be able to move to the next level and maybe I will be better able to understand the GOF bible which I learn is a must read for any serious techie! You do have to be a little imaginative to figure out which pattern can be used where, in real world designs. The examples are very easy to understand but that makes them a little bit too simplistic for an implementation in the real world. Would have liked a section that lists out some usages in real world - my only recommendation. Other than that, this book will get you up and running quickly with patterns!
This book will guide you step by step with a great fun ride about design pattern, from zero to hero. Combine this skill with Refactoring principle, and ready to fight with OOP & Design Pattern skill.

It will make you feel little bored though if you already know a lot about Design Pattern.

It is exciting, indeed, to read a new style of IT book.
Really-really recommended for people who wants to know the design pattern.
Reading a design patterns book for me is interesting when I find that nugget of coolness, the rest of the time it is plain boring. However, this book really keeps it interesting for the most part and still drives home the design points. I think it would make a great book for someone wanting to get into design patterns, which is important for anyone writing OOP. Also, it is a good all-around reference book for the serious and seasoned OOP programmer. I have GoF, and I refer to this book more often.
Let me add my glowing praise to everybody else's for this book. I've been programming for a long time and pretty much thought I knew it all... then this book changed my whole perspective!

As someone who has long espoused Object Oriented principles, I was shocked at how little I really understood their true vale. Simply knowing (and using) principles such as abstraction, inheritance, polymorphism, and the like is not what OO is really about -- it's about writing solid, flexible, maintainable, and all around _good_ code... and that's exactly what this book teaches you. I feel like my eyes have been opened to the true beauty of OO!

Initially I was skeptical of the style and layout -- a far cry from the dry academic text in most programming books. It definitely made the book interesting, but I was shocked at how thorough it was... Every question I had was answered within a few sentences of when it popped into my head (even those rhetorical "I wonder..." questions).

The examples are in Java, but I've had no trouble applying the principles in my C++ and C# work as well. Whether you are trying to keep your job from being outsourced, or you just love programming, this is a book that you shouldn't be without.
This book really deserves its 5 star rating.
This is definately the most interesting and entertaining book i have ever come across on the subject of design patterns. The depth and scope of coverage, makes it a very well balanced read for both design patterns and fundamentals of good object oriented design. Even though the title of the book is simply "Design Patterns", it covers some very important aspects of OO design in addition to it.
The books covers some very practical examples and problem scenarios that programmers and software engineers encounter in their daily environments, which makes it very valuable to the reader and fun to read as well.
I wish if the "Head first" series would add much more topics in their collection of publications. :)

Syed Ghaznavi
If you plan on ever going into a programming/computer science related field, this book is a must. Great reference book, and easy to understand and retain information. This book will help a programmer transform into a software engineer. I never understood the full power of abstract / interface classes until reading this book (one of my college professors reccommended it for his software engineering 2 class). In my four years of college, the best book I purchased.... by far.
I'll be quick.

Though I have several reference sources for various design patterns in common use today, I found this one of the easiest to read and absorb. As stated in a few reviews, they don't drone on with lengthy paragraphs in a general context. Instead, in an iterative fashion, they introduce the reasons that brought forth the design pattern, provide valuable examples to reinforce the earlier concepts, and then clarify any issues that may remain.

Buyer Beware! If you have a university background and/or simply not interested in a rather unorthodox technical book with regards to its teaching methods, then I'd suggest you steer clear of this work.
I wasn't going to buy this book because of the cover (what a reason, he he), but after reading the reviews I decide to give it a try before buying the GoF book.

I have found this book useful in the patterns that I really didn't understand, but for a lot of parts I just decided to skip pages since the book is sometimes too verbose and have a lot of graphics and diagrams.
I wasn't very familiar with Design Patterns in the formal way before this book, but as I was reading it I realized how many times I applied these concepts in my work without knowing that they were patterns.
After reading it I feel much more confident about object oriented design.

Excelent for beginners, maybe too verbose for seasoned developers, but it's still fun and useful!.

I will keep reading One First Series in order to learn other topics I'm unfamiliar with.
This is just an amazing book! Hats off to O'Reilly and Freemans for putting together this book. Book explains the concepts with incredible ease and simplicity, better yet, its such an interesting one that you just dont feel like stopping.

I've been exploring books on Patterns for a while and there are really good ones with 5 Stars etc but they take more traditional approach and things can get boring.

Over all, this just the book you need if you wanna get started with Design Patterns and build a solid foundation.
This book is beyond the shadow of doubt the best TO LEARN Design Patterns. It's fun at same time easy to follow and very instuctive.

If you are a Java programmer and want a book to learn Design Patterns, this is the book you must have! The GoF book is more a catalog, or reference, than an instructional book, but this one give you the why, how and when use a specific Pattern.

The authors don't cover all Design Patters existent, they don't even cover in deep all Patterns from GoF, but they teach the main ones.

I highly recomend this book, personally I think that every developer should know the Patterns covered in this book, because they represent the problems we face about every work day.
This book took the most novel approach to learning Java that I have ever seen. I learned more about Java patterns reading this book then I learned in 1 class and 2 books. With that said, the books learning style will not be for everyone. This book uses lots of humor and quirky examples to get it's point across. I took to the style like a fish to water. However, for those of you who are into the more traditional format of Java books and computer books in general, then this book is not for you. If you are a little more open minded and are willing to try something different when it comes to learning Java patterns, then I suggest this book. I enjoyed this book so much that order two of the other books in the Head First Series (Java and EJB).
Most computer books generally skip or just brush by explanations of why a certain set of coding practices are important. Better than any book I've seen in computing, this book tackles a complex topic and drives home the importance of why a given pattern is important. Rather than "do this because we know it's good for you", this book drags the reader through an information maze, constantly nuding the reader's involvement with a series of zany and not-so-zany exercises. The humor is both campy (with the Andy Hardy era photos) and hip. However, it's not superflous or off point. Everything in this book has been woven together into a fine collection of explanations, exercises and examples, the likes of which I've never seen.

The care given to how everything ties together is remarkable, and while some may snort that the book is too cartoony, I found it to be otherwise. (It's like saying that the New Yorker is too cartoony.)

Most important is that this book worked for me. I didn't breeze by it on a single read, but rather I went over it again and again, finding new nugets with each read. Granted, I often didn't do all of the little exercises, and I'm poorer for it. Also, I sometimes skipped the DP Guru exchanges with "grasshopper" (if you've never seen re-runs of Kung-Fu with David Caradine, you may miss the reference), but I still was able to create design patterns -- and in ActionScript 2.0 and ActionScript 3.0; not Java, the language for which the book was written.

So if you want to lean Design Patterns and learn how and when to use them, this book is solid gold.
The list of patterns presented is small compared to other books, but this works well since the coverage is more about learning the basic patterns well with a solid understanding. Also of great value is the way each pattern is taught by presenting common problems with the obvious, but wrong, solutions and then leading you out of the hole you dug and highlighting the important steps towards a better and more maintainable solution.

I was particularly impressed how the presentation of each pattern was built on solid Object Oriented concepts. But rather than assuming you know these advanced concepts, they are integrated into the learning exercise and presented as a cohesive bundle. The book is also structured so it refers back to and reinforces both the pattern and OO lessons as you progress.

It's hard to find real fault with the book. At times it jumps between topics, is repetitive and a bit irreverent, but this is all part of the formula and exactly what is promised.

Beginner or experienced, you better be careful or you might learn something. If you're not sure what I mean by this, maybe take the time to flip through the introduction in a shop. I haven't read any other HF books yet, but they'll be the first place I look for future needs!
I've got a number of years of software development under my belt. Like most of my colleagues I use design patterns on a daily basis, yet sometimes struggle to identify them by names defined in GOF book, which I've read years ago.
I decided to refresh my memory by reading another book on patterns.
While GOF book covers more patterns, it's not as nearly as much fun to read as Head First Design Patterns. Head First book is simply brilliant! It took me through my early days experience of creating stupid solutions and refactoring them into something nice and elegant. I wish I had this book back then :)
The book is structured very well, with hands-on examples understandable by anybody who can read code.
Bottom line:
- I definitely recommend this book to any junior developer who wants to get familiar with Design Patterns
- Experienced developers will skip quite a few pages (like I did), yet it's still a good read. Most of the time you'll be thinking "a-ha, so this stuff I did yesterday is called Facade!". Knowing the names of patterns saves time in communicating ideas with colleagues. So go and get this book, it's worth it.
I flipped through this book to get a feel for how it will differ from other design patterns works. I immediately realized that the authors are taking a very accessible approach to teaching readers about patterns.

On an individual basis, the text is very accessible. It is written in an easy-to-read style. Instead of avoiding technical jargon, the text improves understanding and retention by coupling technical terms with humorous anecdotes and quips. This approach gives the feeling that design patterns are within reach (and they are) of even readers new to the concepts. It also serves as a built-in mnemonic tool.

The structure of pattern delivery seems to be intentional as well. In the rare case where a pattern is referenced without yet being described, it is almost always in the context of how the current pattern will prove useful in other scenarios. As such, the reader never feels lost. In fact, quite the opposite affect occurs. Readers should feel like they are following a logical approach to learning patterns.

Although it may seem, from the above comments, that the book is elementary, I assure you that even seasoned developers will find the book useful. Even if you know the material extremely well, you may find that the authors' descriptions are useful when teaching junior developers on your teams.

The book layout, like the rest of the book, is broad-reaching. Obviously, it is an instructional work. More than that, however, the book is also a teaching tool. It can easily be adapted by educators and trainers for classroom-style and one-on-one teaching. The book also serves as a workbook. There are exercises and notes pages throughout each chapter. Finally, the book serves me as a reference work as well. If I remember the gist of a pattern but not the specifics, it is easy to find examples and canonical references.

I absolutely love this style. I highly recommend this book for anyone wanting to learn patterns, refresh their existing patterns knowledge, or just take in a proverbial "breath of fresh air" to the stiff writing style of other books covering complex topics. I also feel that any of the "Head First" books are worth consideration. They provide accessible formats that promote learning.

I have to close this review by concurring with the authors in their note to the "Gang of Four". Seriously, when are we going to see another book? :)
This is the best design patterns book i have ever laid hands on.
With an absolutely different approach this book makes learning design patterns such an enjoyable experience.
Having worked with Object Oriented programming in Java for many years i found myself enjoying the reading with every page and could see many aspects of design practically unfold in multitude of images in my mind as well as in the book.
The examples are great, the bullet points are excellent and the pace and tone of the text alongwith the images and drawings are absolutely fantastic.
I would recommend this book to anyone who wants to learn and apply patterns in their object oriented programming.
Kudos to the authors who have done such a wonderful job
This is the first book of the Head First series that I've read, and I have to say that I love it! I think their teaching approach is very very efficient. Each concept is presented to you in many different ways and at the end your brain finds its way to metabolize it. Sometimes it's a picture that catch your attention, sometimes it's just a joke but at the end the concept sticks in your head and is gonna be there forever (at least I hope so :-))) ). Moreover this book is so easy to read. I recommend it to anybody that wants to learn Design Patterns (in Java) in a painless and fast way.
How many times can you say that a technical book is entertaining, fun to read and packs lots of information into your brain....not many times. Well, this is one of the great books that does all of that.

The patterns are explained in a creative setting, with the smallest possible example code (so you learn the topic, not wade through a bunch of non-topic related code).

My only issue is that they don't cover all the patterns, they give a brief overview of the remaining patterns at the end of the book). But, they do cover the most used and useful patterns in detail.
I reviewed many of the excellent books on design patterns to select the best book for a senior level undergraduate course on design patterns. I selected Head First Design Patterns for the fall 2005 semester. The students and I really enjoyed the book and learned a lot. Fourteen design patterns are covered in a logical manner leading up to an excellent coverage of Model View Controller. The examples are superb and introduce many advanced java features such as reflection, threads, servlets and remote method invocation. I highly recommend it as a non traditional textbook that effectively teaches design patterns and good object oriented design practices. I plan on using it again next year.
This is the first book on Design Patterns where I really "got" it. I've read other books, and thought I understood them, but I really didn't - not deeply. This book really helped me to develop a deep understanding of Design Patterns, how and when to use them and in particular, how they relate to object oriented programming principles. I really like that the authors don't assume you understand everything about object oriented programming before reading this book, like a lot of other books do. And the fun style of the book just made me want to keep reading, which made learning much more enjoyable.
This is a very suitable book for learning Design patterns. I have several patterns books and I think this is the most enjoyable book I have ever seen. You would not fall asleep reading this book.The code fragments are shown in such away to convey the idea across very nicely and with such clarity. I really enjoy the sidebar where the Pattern "Guru" converse with the "Grasshopper" student about pattern "truths".
Since I hold several graduate degrees, I have a lot of respect for authors who could assimilate complexities and then present them in a pedagogical way to help others, the "mere mortals" ,without resorting to using bombastic terms or words. This book certainly has achieved its objective really well.
I really look forward to a sequel to this and maybe a "Heads First Web services" or "Heads First XML"?
As another reader said, GoF is the best book on patterns. Sure. It is THE book. And if you can pick it up off the shelf without knowing anything about patterns to begin with, and read more than a chapter without falling asleep, my hat's off to you. If you are a normal human being though, this is the book you want to start with. Head First will get you up and running, and understanding what patterns are, and actually get you excited about using them. When you finish this, GoF might not be so painful.
I've been programming for over 20 years, and in the last few years I've been learning Object Oriented programming in Java and .Net. I've read lots of books and articles on how to do object oriented design. If I had to write a business program that needed a Cat object that inherited from from Pet, or a Circle object that inherited from Shape, I'd have been set to go. But until now, I couldn't find business oriented examples of how to design a program on object oriented principles. This book is the answer! It's easy to read and understand while delivering complex concepts. Their examples are simple enough that you don't get bogged down in a lot of irrelevant details, but complex enough to be realistic. I'm only half way through the book at this point, but if I had to stop now, it would still be worth the money and time spent on it. I highly recommend this book.
 
Share your thoughts with other customers
Create your own review