Metaphor and metonymy in object-oriented design patterns

  • Authors:
  • James Noble;Robert Biddle;Ewan Tempero

  • Affiliations:
  • Victoria University of Wellington, New Zealand;Victoria University of Wellington, New Zealand;Victoria University of Wellington, New Zealand

  • Venue:
  • ACSC '02 Proceedings of the twenty-fifth Australasian conference on Computer science - Volume 4
  • Year:
  • 2002

Quantified Score

Hi-index 0.02

Visualization

Abstract

The key principle of object-oriented design is that each program object should correspond to an object in the real world, that is to say, a program is a metaphor for the world. More advanced object-oriented designs, such as many of Gamma et. al.'s Design Patterns, are not directly metaphorical: State objects, Strategy objects and Visitor objects, for example, do not correspond to objects in the real world. We show how these patterns, and other similar designs, can be understood as metonymy, rather than metaphor, that is, they are based on an attribute, cause, or effect, rather than being based on something in the world, in terms of Jakobson and Lodge's typology. Understanding how both metaphor and metonymy can be used in design can illustrate how design patterns work alongside more traditional object-oriented modelling to produce designs that are accurate, flexible, and better understood.