CBR Logo


CBR*Tools Documentation


B1.Abstract Factory


B2.Adapter


B3.Chain of Responsibility


B4.Composite


B5.Facade


B6.Factory Method


B7.Iterator


B8.Prototype


B9.Strategy


B10.Template Method


Logo of Inria at Sophia Antipolis


French flag - link to the french documentation


Return to the Action AID
main page

Annex B: Design Patterns

B5.Facade

Description

When we wish to facilitate the use of a subsystem, this pattern allows to provide a simplified interface, which avoids the direct coupling between the clients and the elements of the subsystem.

Structure and Components

Structure and Components of the Facade design pattern

Structure and Components of the Facade design pattern

  • Facade defines an interface unified for the subsystem and gives access to certain public components,
  • C1 to C7 establish the functions of the subsystem,
  • FacadeClient handles the subsystem by passing through the facade.

Collaborations

  • the client handles the subsystem by addressing itself to the facade or to the elements of the subsystem made public by the facade,
  • the facade transmits the requests to the subsystem after transformation, if necessary.

Strengths and Weaknesses

Plus sign decrease the coupling between the client and the subsystem,

Plus sign mask the private elements of the subsystem,

Minus sign the unified interface presented by the facade can be too restrictive to use the whole set of the functions of the subsystem.

Use in CBR*Tools

The controller of the reasoning ( Reasoner class) is a facade for the whole system of reasoning, the memory ( Memory class) is a facade simplifying the management of the case bases and the indices, finally the behavioural part ( BehaviouralSituation class) of a behavioural situation is a facade of the behavioural indices to simplify their management.




Valid XHTML 1.0! Valid CSS! Brigitte Trousse
Last modified: Fri Sep 28 13:51:49 MEST 2001