Javascript Design Patterns: Flyweight Pattern

Category : code

Date : May 22, 2016

Flyweights are another important structural pattern which gives us a way to optimizing code that is repetitive and shares data. It is mainly know for conserving memory by sharing portions of data in between objects for smaller memory footprint.

Flyweight pattern comes with little overhead which is why you should be considering this implementation only when there are a lot of object in your application and data is repeative.

If you have any questions, comments or suggestions, feel free to join the discussion below!