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
@@ -26,6 +26,10 @@ Wikipedia says
> Factory is an object for creating other objects – formally a factory is a function or method that returns objects of a varying prototype or class.
Sequence diagram
![Factory sequence diagram](./etc/factory-sequence-diagram.png)
## Programmatic Example of Factory Pattern in Java
Imagine an alchemist who is about to manufacture coins. The alchemist must be able to create both gold and copper coins and switching between them must be possible without modifying the existing source code. The factory pattern makes it possible by providing a static construction method which can be called with relevant parameters.
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB