Sebastopol, CA--Imagine if, after putting together a list of the most tedious tasks and aggravating problems you needed to resolve in a given week, you discovered that someone else had already solved your problems. And not just solved them, but solved them in a way that is practical and elegant and that provides you with a springboard for solving later problems. You probably wouldn't try to solve them all over again. The idea behind design patterns is that frequently the challenges you're working on have already been tackled by other developers. Using design patterns, you can take advantages of the best practices and experience of others, so that you can spend your time on...something else. Why, then, does the mention of design patterns elicit groans from so many developers? Because, as is often the case, it's a wonderfully simple idea that seems devilishly slippery to grasp. Unless you go at it head first.
Head First Design Patterns (O'Reilly, US $44.95) by Eric Freeman and Elisabeth Freeman, with Kathy Sierra and Bert Bates--creators of the Head First series--takes a different approach. The Head First authors know that you want to learn about design patterns in a way that won't put you to sleep: 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 also 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 paddle.
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.
If you've ever seen a Head First book, then you'll know what to expect: a visually rich format designed for the way your brain works. Using the latest in neurobiology, cognitive science, and learning theory, Head First Design Patterns loads patterns into your brain in a way that sticks.Advance praise for Head First Design Patterns:
"I received the book yesterday and started to read it...and I couldn't stop. This is definitely tres 'cool.' It is fun, but they cover a lot of ground and they are right to the point. I'm really impressed."
--Erich Gamma, IBM Distinguished Engineer, and coauthor of "Design Patterns"
"I feel like a thousand pounds of book have just been lifted off my head."
--Ward Cunningham, inventor of the Wiki and founder of the Hillside Group
"This book is close to perfect, because of the way it combines expertise and readability. It speaks with authority and it reads beautifully."
--David Gelernter, Professor of Computer Science, Yale University
"One of the funniest and smartest books on software design I've ever read."
--Aaron LaBerge, VP Technology, ESPN.com
Further reviews can be found here.
- Chapter 3, "The Decorator Pattern"
- More information about the book, including table of contents, index, author bios, and samples
- A cover graphic in JPEG format
O’Reilly Media spreads the knowledge of innovators through its books, online services, magazines, and conferences. Since 1978, O’Reilly Media has been a chronicler and catalyst of cutting-edge development, homing in on the technology trends that really matter and spurring their adoption by amplifying “faint signals” from the alpha geeks who are creating the future. An active participant in the technology community, the company has a long history of advocacy, meme-making, and evangelism.