December 2018
Intermediate to advanced
414 pages
10h 19m
English
To conclude this chapter on structural design patterns, we'll dive into the flyweight pattern. You may want to use the flyweight pattern when:
Let's say you want to build an application to help with groceries and recipes. As input, we may have lists of ingredients and their amounts, based on their names, as strings. We want to be able to make lists, organize them, and more.
While we technically could store the strings as our base items, we'll use the flyweight pattern to encapsulate those item names. This will help us be more accurate in the ...
Read now
Unlock full access