Lecture Notes for CS 325

Patterns, 13 March 2000


  1. idioms

    1. example - while (*s++ = *p++) ;

    2. characteristics - language specific, specialized, obscure

  2. cliches

    1. example - for (i = 0; i < |A|; i++) if (A[i] == x) return i;

    2. characteristics - language independent, general but small scale

  3. patterns

    1. example - create only one instance of an object

    2. characteristics - problem independent, more general but still small scale

    3. parts of a pattern

      1. context - the place where the pattern gets used

      2. agents - the source of the problem

      3. solution - how the agents work within the context

    4. example - model-view-controller

      1. an early, famous smalltalk pattern

      2. context - a model having an accurate, up-to-date visual representation

      3. agents - the modeler, the viewer, and the changer

      4. solution - agents receive notifications, react, send notifications

    5. history

      1. christopher alexander - A Pattern Language

      2. gamma, helm, johnson, and vlissides (the gang of four) - design patterns: elements of reusable object-oriented software

      3. pattern language of programming design (plop) - bi-annual conference

    6. pattern types

      1. design patterns - common, object-oriented design structures

      2. architectural patterns - large scale patterns ranging over systems

      3. idioms - small scale patterns ranging over code

      4. analysis patterns, communications patterns, management patterns,...

      5. anti-patterns - resulting in a bad situation, clearing up a bad situation (refactoring)

    7. pattern problems

      1. huge amounts of hype

      2. patterns that aren't patterns

        1. example - the long-name pattern

        2. patterns solve a specific problem

        3. patterns are derived from previous solution experience

        4. patterns significantly engage the context and the actors

      3. lots of mysticism and metaphysics - the quality without a name, the timeless way

      4. patterns are not easy to understand and use


This page last modified on 13 March 2000.