Most Helpful Customer Reviews
40 of 42 people found the following review helpful:
5.0 out of 5 stars
Holub on Holub, October 29, 2004
This review is from: Holub on Patterns: Learning Design Patterns by Looking at Code (Hardcover)
This is a very enjoyable book. Reading it is a little like sitting down with an oldfashioned master craftsman. I mean the kind who shows you, step by step, how he plies his trade, and offers a cantankerous side-commentary of opinion on just about everything while he does it. The commentary on p.283, for example, describes a very questionable programming trick that he pulled, and why, and why this one violation of normal practice is acceptable in this one case. In other words, it's real - a little gritty, not like didactically pure textbook examples. It's what real programmers really do.
The book is basically a commentary on the Gang of Four. It's certainly not the first, but it has a unique format. He demonstrates all 23 of the GoF patterns by applying them to two modest-sized Java applications. This is great for people who need concrete code to see what the pattern really means. It's even better because it shows multiple patterns overlapping, where one application class has different duties in the different classes. A large part of the book's bulk is code listings for the applications - some classes exceed 1000 lines of source code. I normally consider that to be a waste of paper. This time, however, the code is complex enough that it really does need to be presented right next to the commentary. (The code is also available electronically at holub.com .)
Towards the end of the book, he says "So, that's all of the Gang of Four design patterns, all tangled together in the two programs ... the way the patterns appear in the real world ..." That tang of realism is what gives this book such an unfamiliar format, and gives such contrast to the standard, one-at-a-time reductionist descriptions of each pattern in isolation. I'm not saying this holist approach is better; a beginner will just get lost in the whirl. Holub's holism isn't worse, either, it's a complement to the microscopic, academic presentations seen elsewhere. This book plus the analytic pattern catalogs form a sum much more valuable than the parts.
I recommend this very highly. The successful reader already is already quite familiar with Java and with design patterns. That reader is ready to take the next step, from the theory of patterns into their practical application. Seasoned pros may not get much form this book. An advanced beginner, with a little determination to see it through, will get a lot.
//wiredweird
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
10 of 10 people found the following review helpful:
5.0 out of 5 stars
Pragmatic patterns, Holub style, January 3, 2005
This review is from: Holub on Patterns: Learning Design Patterns by Looking at Code (Hardcover)
In order to read Allen Holub's new book, you'll certainly need some programming skills (Java, OOP and patterns to be more specific). On the back of the book, there's specified 'Intermediate to Advanced'. It certainly depends on what you mean by 'Intermediate'... because the book is not exactly a light read. But then again, we don't expect that from Allen Holub. We want interesting, insightful books from him, and 'Holub on Patterns' falls nicely into that cathegory. However, some 'intermediates' should prepare themselves for a harsh ride.
The volume is structured in 4 chapters. The first one contains some 'preliminaries'. Meaning : short explanations about why OOP is still incorrectly used, design patterns are not fully understood, plus a bonus of controversial statements like 'getters and setters are evil' and 'Swing is an over-engineered piece of junk' [well, maybe not exactly these words]. As a direct consequence of reading this chapter, the 'intermediates' will start banging their heads on the closest wall available : "My code sucks ! I swear I'll never blindly copy/paste again !".
In the second chapter things really start to heat up. Allen explains why 'extends is evil' and interfaces are not evil. In case we needed an example of fragile-base-class problem, here we go with some MFC bashing (usual stuff). The chapter focuses also on some creational patterns such as Factory and (at great lenghts) Singleton. I especially liked the cool explanations of how to shut down a Singleton.
The third chapter discusses an [overly complex, on purpose] implementation of the 'Game of Life'. Between huge chunks of code (a bit much for my taste) scattered throughout the chapter, the author explains all the implementation choices: from Visitor to Flyweight. Some 60% of the GoF patterns are encountered in this chapter's code.
The fourth and last chapter contains 'production code', as the author declares. It's a small in-memory database, with and embedded SQL interpreter and a JDBC driver. Very solid example, but it'll probably scare away a few 'intermediates'.
It all ends with an Appendix containing a great 'Design-Pattern Quick Reference', presenting the most used patterns in a very pragmatic format. Each pattern is explained via a diagram, some Java code snippets, its motivation, pros and cons, and a very original 'Often Confused With' paragraph.
Unlike all the other pattern books you've read before, this is not a reference. It's a real programming book that you'll have to read from cover to cover. You'll also need solid programming skills in order to understand the last two chapters (and especially the last one).
My gripes:
- too much code. Probably more than 1/3 of the pages are just printed code.
- typos. There is a slightly disturbing amount of typos in the book, even in some code snippets [like for instance 'Sting' instead of 'String'].
However, these problems should not scare away any potential readers. Because of its original pragmatic approach, 'Holub on Patterns' is surely in the Top 10 Java books for 2005.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
6 of 6 people found the following review helpful:
5.0 out of 5 stars
Practical Usage of the Design Pattern, May 3, 2005
This review is from: Holub on Patterns: Learning Design Patterns by Looking at Code (Hardcover)
I read the GoF book, Design Patterns Explained before reading the 'Holub on Patterns'. They treat same subject but take different approaches.
GoF is the nominal Bible of Design Pattern. Everybody would accept this fact. But this is a dictionary like reference book. As like reading great books to write a good composition, programmers must read great code to write a good program. Dictionary is only assistant tool. It is perfect but not real. Too Abstract!
Design Patterns Explained, i think, is a good book. This give us new perspective to the real OO. But DPE is not code-oriented. Good conceptual explanation, but not great amount of great code. And DPE also not treat all GoF Patterns.
This is the reason Holub on Patterns came to live. Holub give us new perspective through Chapter 1, 2. Chapter 1 mainly treats 'getter/setter' and Chapter 2, 'extends relationship'. But there are more to those. Especially 'Pushing vs Pulling' and 'Cellular Automata', 'Don't ask information, but ask help' was very helpful.
Chapter 3. Game of Life. This chapter treate Conway's Game of Life implementation in the perspective of Design Pattern. Somewhat good. Holub took hardcore design pattern approach in this chapter, so reading a code was somewhat difficult. but this is also his intent. He tells overuse and misuse of patterns would only increase the complexity of program without benefits indirectly. (Of course Game of Life is not too much hardcore).
Chapter 4. SQL Interpreter. This code is really great! I wrote the similar program with similar functionality in C when I learn database. And through Holub's implementation comparing my impl in 'procedual C', I could feel real OO's benefit. Again. Great!
And... Apendix. Good abreviation version of GoF Catalog. More clear 'Intent' explanation, and more practical code examples.
To my thought, learning patterns through real code, not toy code also is more efficient in memorizing aspect cuz we can remember pattern in the context of total program.
Recommand to you!
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
|