Updated: 10/12/2016

Developing Solution: Design Patterns


Design Guide

Flyweight is a design pattern that can be made use of for the Design Guide. Flyweight aims to make web pages where there are large amounts of resources such as images more efficient. This is especially useful for the design guide since a large amount of images are loaded. The Design and Component sections are separate and long pages with lots of contents to load. If the user switches regularly between the two, resources will be wasted to reload these long pages. To optimise the viewing experience, a ‘Factory is created to cache and reuse existing instances [1]. The client would use the factory to request objects. The factory creates flyweight object for images that are already loaded including positional parameters.

[2]

This design pattern would speed up the load times for our website and make for a smoother browsing experience.


References

[1] Dofactory.com. (2016). Flyweight .NET Design Pattern in C# and VB - dofactory.com. [online] Available at: http://www.dofactory.com/net/flyweight-design-pattern [Accessed 10 Dec. 2016].
[2] Sourcemaking.com. (2016). Design Patterns and Refactoring. [online] Available at: https://sourcemaking.com/design_patterns/flyweight [Accessed 10 Dec. 2016].