Facade

Intent

Provide a unified interface to a set of interfaces in a subsystem. Facede defines a higher-level interface that makes the subsystem easier to use.

Class diagram of the original GoF pattern

structure-GoF:facade

Improvement in MixJuice

Solved Problem(s)

Information hiding problem
Hiding of subsystem classes from clients is not supported by OLD object-oriented languages. (This problem is mentioned at p.188,line.33-37 in the GoF book.)

Used programming technique(s)

Namespace separation.

Consequences

Structure and pseudo code

structure:facade_sample1

module subsystem {
  define class C1 { ...  }
  define class C2 { ...  }
  ...
}

module facade {
  define class Facade {
    define abstract void easy_operation();
  }
}

module facade.implementation extends facade, subsystem {
  class Facade {
    void easy_operation() { ... }
  }
}

Akira TANAKA <akr@m17n.org>, Yuuji ICHISUGI <y-ichisugi@aist.go.jp>

Top