Head First Design Patterns
Now updated for Java 8!
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.
Buy this book now on Amazon.com
- Head First Design Patterns won the 2005 Jolt Product Excellence Award, General Category in March, 2005.
- Head First Design Patterns was awarded number 17 in the Book Pool Top 50 Books of 2004.
Book code and downloads
- Download a sample chapter: Chapter 3: Decorator Pattern
- Download the latest code from Github (zip file).
- Download the original Java code here (zip file). The source files are in the src directory and the class files are in the bin directory.(These files are from 2004. For the most recent updates to the code, download from Github.)
- Download the MVC song here.
- Download README.txt. This has all the command line run commands for each application, as well as helpful comments.
- Download the heatindex.txt file containing
the heat index formula for the Weather Station in chapter 2.
- Download the test.txt file for chapter 3
- If you are using ant to compile the java files, you can download the build.xml file. (Make sure you name this file “build.xml” to use it with ant.)
- Download the code examples in C# here (ZIP file) (hosted and supported by Mark McFadden).
- Download the code examples in C++ here (created and supported by Glenn Puchtel).