About me
Services
Projects
Design Patterns
Archive
Contact
home > Design Patterns

Design Patterns

When was the first time you used a Pattern? Me, probably the making Christmas cookies when I was a kid. You, know those plastic or tin cookie cutters you would use to make Snowmen, Christmas trees and stars? Those were patterns. Ever think of why they have sidewalks in your neighborhood? The sidewalks are the result of implementing the pattern for your residential neighborhood, clearly defined boundries for pedestrian and vehicular traffic. Essentially, a pattern is used over and over again to create an identical solution. Software design patterns are no different, they provide a solution to a recurring software design problem.

According to Gamma, Helm, Johnson and Vlissides (the Gang of Four) a pattern has four essential elements. (GoF: Design Patterns, Elements of Reusable Object-Oriented Software, 1995)

  1. Pattern Name: The handle we can use to describe a design problem.
  2. Problem: Describes when to apply the pattern.
  3. Solution: Describes the elements that make up the design.
  4. Consequences: Are the results and trade-offs of applying the design.

The design patterns that I have described in the following pages have been described using the Java programming language. Of course, all of these Patterns can be applied using any language, but the implementation will be different. Where possible I have included a small zip file containing the code for each example.

Singleton Design Pattern

Abstract Factory Design Pattern
Good luck!
Copyright 2008 Graham Lange All rights reserved
SUBSCRIBE