docs: add diagrams for facade, factory kit, factory method, factory, fan-out/fan-in, feature toggle, filterer, fluent interface, flyweight, front controller, function composition

This commit is contained in:
Ilkka Seppälä committed 2025-04-06 19:10:43 +03:00
1 parent aef4b37c9a
commit 9b64cdee98
21 files changed
+40 -5

No files matched your search

+4
View File
@@ -30,6 +30,10 @@ Wikipedia says
> In computer programming, flyweight is a software design pattern. A flyweight is an object that minimizes memory use by sharing as much data as possible with other similar objects; it is a way to use objects in large numbers when a simple repeated representation would use an unacceptable amount of memory.
Sequence diagram
![Flyweight sequence diagram](./etc/flyweight-sequence-diagram.png)
## Programmatic Example of Flyweight Pattern in Java
Alchemist's shop has shelves full of magic potions. Many of the potions are the same so there is no need to create a new object for each of them. Instead, one object instance can represent multiple shelf items so the memory footprint remains small.
Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB