SAM SIG: A Real-World Application of Design Patterns



  • The Monthly Meeting of the SAM SIG


    Presentation Overview

    One of the main problems with most of the design-patterns books is the catalog approach that they take. In the real world, the patterns are all jumbled together, interacting with each other in complicated ways. They never appear in the splendid isolation that you'd infer from the Gang-of-Four book, for example.

    In his new book, "Holub on Patterns: Learning Design Patterns by Looking at Code", Allen Holub attempts to solve this problem by turning things inside out. The book describes two nontrivial examples (a Game-of-Life application and an embedded SQL interpreter) from the perspective of the patterns used to implement them. Rather than present each pattern in isolation, the programs are described along with the patterns used and the motivation for their use.

    In this presentation, Allen will introduce the architecture of the Life program, and analyze it from a patterns point of view. The UML and associated code that realizes the architecture will be discussed; and the interactions of patterns and their "real world" use will be clearly shown.

    THIS IS NOT JUST AN INTRODUCTION TO BASIC PATTERN CONCEPTS. It is assumed that presentation attendees will have at least a nodding familiarity with the Gang-of-Four patterns, and that they have the ability to read Java code. A great homework assignment would be to brush up on these patterns before the meeting: Visitor, Observer, Flyweight, Composite, Prototype, Mediator, Memento, Facade, Abstract Factory, and Singleton.

    The code for the Life program (and Allen's book) is available at


    About the Presenter

    Allen Holub

    Allen Holub has worked in the computer industry since 1979 on everything from operating systems, to compilers, to web applications. He is a consultant providing mentoring and training in OO-Design and Java develeopment, technical due diligence, design reviews, and he even designs and writes programs on occasion.

    Allen was an early adopter of Java, programming in it since its release in 1995. He worked in C++ for eight years before that, and has also worked in C, Perl, Pascal, PL/M, FORTRAN, SQL, and various assembly languages. He learned design the hard way, by beating his head against programs that he'd rather not admit that he'd written, and is now a recognized expert in OO-Design, UML, and process. He served as a Chief Technology Officer at NetReliance, Inc. and sit's on the board of advisors for Ascenium Corp. and Ontometrics. He is the Security-Track chair for the Software Development conference.

    Allen has authored nine books (including Holub on Patterns: Learning Design Patterns by Looking at Code, Taming Java Threads, and Compiler Design in C) and 100+ magazine articles (for Dr. Dobb's Journal, Programmers Journal, Byte, MSJ, and others). He has been a Contributing Editor for JavaWorld since 1998, and for SD Times since 2004. He wrote the popular "OO-Design Process" column for the IBM developerWorks Component Zone, and was the technical editor of CMP Media's Java Solutions. He also teaches regularly for the University of California (Berkeley) Extension (OO Design and Java).

    Contact Allen at


    Event Logistics


    Cubberley Community Center
    4000 Middlefield Road, Room H-1
    Palo Alto, CA


    6:30 - 7:00 p.m. Registration/Networking/Refreshments/Pizza
    7:00 - 9:00 p.m. Presentations


    $15 at the door for non-SDForum members
    No charge for SDForum members
    Please call 408.494.8378 for student memberships
    No registration required

    More on the Software Architecture & Modeling....