September 28, 2003

Structural Pattern – Flyweight

“Use sharing to support large numbers of fine-grained objects efficiently”

  • It would be flexible in a word-processor to create an object for every letter, but unmanageable
  • Important to decide intrinsic and extrinsic values
  • Character Example:

Intrinsic: The character. ‘A’

Extrinsic: The font, position, etc.

Links:

http://www.dofactory.com/Patterns/PatternFlyweight.aspx

Flyweight pattern discussion