
Software Design – The Flyweight Pattern
We continue a look at the structural patterns with a stop at the flyweight. This pattern is one I find ignored more often than it should be. In particular, the large number of data items we typically model in modern applications are often best handled through this pattern. The Flyweight Pattern Defined As always, we will start with the “Gang of Four” intent to set the stage for our discussion. “Use sharing to support large numbers of fine-grained objects efficiently.” Short and sweet. This intent is to model large collections in the best way based on data needed and memory considerations. A flyweight is an object-oriented approach to data modeling that is practically an index. We only keep up with the... Read more