Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Holub on patterns : learning design patterns by looking at code
Holub A., APress, LP, 2004. Type: Book (9781590593882)
Date Reviewed: Apr 13 2005

Holub expresses his views on software design patterns in this book. His views are centered on the implementation of design patterns in Java programs. A design pattern can be implemented in many ways. The author discusses these ways, and presents the ones he prefers. Three real-life problems, along with other small problems, are chosen for this discussion. Between ten and 15 design patterns are discussed. Knowledge of Java and object-oriented concepts is a prerequisite for reading the book.

The book is divided into four chapters. The first chapter begins with an explanation of the difference between patterns and idioms. A general introduction to patterns and objects follows. The chapter ends with a discussion on the get and set methods; the author discourages the use of these methods. The chapter contains cellular automata as the major example.

Chapter 2 begins with a discussion of classes and interfaces in Java. The general view expressed is that programmers should use more class interfaces, rather than class inheritance. Multiple inheritance is projected as a design pattern, and a good method of implementation is presented. There is also a paragraph discussing framework-based programming in this context. In the discussion, the template method pattern, the factory method pattern, and the singleton pattern are explained, with details. Later, the discussion flows to the abstract factory pattern. The chapter ends with commands, and a strategy pattern for creating objects.

The third chapter discusses a problem called “game of life.” After explaining the problem, a unified modeling language (UML) diagram is presented as a solution. The UML diagram is accompanied by another diagram showing all of the design patterns used in the solution. The observer pattern is described, with its various methods of implementation. This is followed by a discussion of the visitor pattern; composite, facade, and bridge patterns are also discussed in detail. Following this is a discussion of the mediator, prototype, flyweight, and memento patterns.

The example in chapter 4 describes the implementation of embedded structured query language (SQL). The chapter begins with a paragraph on the requirements of the problem. The implementation architecture presented has three layers: the Java Database Connectivity (JDBC) driver, the SQL engine, and the data storage layer. The UML diagram showing the static structure of the data storage layer is accompanied by a diagram illustrating the design patterns involved. The discussion of the data storage layer centers on table implementation: the bridge pattern is used for the table interface; the abstract factory pattern is used for the table creation process; the iterator pattern is used to examine the table; the command pattern is used for a transaction on the table; the strategy pattern is used for table modification processes; and the decorator pattern can be used to produce variants of the table. The discussion of tables is followed by the discussion of other layers. The UML diagram and a diagram showing the design patterns for both of the layers are presented. The tokenizer and parser are described, along with a chain of responsibility pattern. A detailed discussion of the proxy and interpreter patterns follows. The chapter ends with a separate section on the JDBC layer. An explanation of the state and adaptor patterns can be found in this section.

The appendix contains a design pattern quick reference. The reference for each pattern contains an associated UML diagram, component definitions, a description of the problem the pattern solves, pros and cons, related patterns, implementation notes, and usage information.

Holub’s experience is reflected throughout the book. His views are expressed with clarity, and are supported with discussions. The book distinguishes itself from other books on design patterns by focusing on implementation. Software consultants, practitioners, and professionals appear to be the book’s target audience. Any reader in the Java world could definitely benefit from reading the book. A good number of pages are devoted to actual Java code. Programmers new to design patterns can understand various patterns by reading the book. Readers with a background in software design, software architecture, and software implementation will find the book interesting. The discussions in the book flow smoothly. The book avoids mathematics, or theories of objects, in its discussions; it is not written in a typical textbook style.

Reviewer:  Maulik A. Dave Review #: CR131116 (0602-0117)
Bookmark and Share
  Featured Reviewer  
 
Structured Programming (D.2.3 ... )
 
 
Object-Oriented Design Methods (D.2.2 ... )
 
 
Patterns (D.3.3 ... )
 
 
Design Tools and Techniques (D.2.2 )
 
 
Language Constructs and Features (D.3.3 )
 
Would you recommend this review?
yes
no
Other reviews under "Structured Programming": Date
Programming by steps
Scarlatescu R. Acta Cybernetica 16(2): 293-314, 2003. Type: Article
Mar 31 2004

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy