This is the continuing post in a series of post on Design patterns.
Presently we are going through the structural patterns. I will be
writing about the flyweight pattern today.
You can read about the other patterns from the following links
Flyweight pattern deals with sharing of common information in smaller
objects used that are being used in large numbers. This can rescue the
storage necessities of these objects. The flyweight pattern deals with
the internal and external state of the objects. What it helps in
accomplishing is that the internal state can be shared across objects
and external sate can be computed on the “fly”.
The flyweight pattern is used when we have many objects that may be
memory intensive “and” the sate of these objects can be computed at
In my next post I will talking about the Adapter pattern.