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ä
2025-04-06 19:10:43 +03:00
parent aef4b37c9a
commit 9b64cdee98
21 changed files with 40 additions and 5 deletions
+4
View File
@@ -36,6 +36,10 @@ Wikipedia says
> In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. This is done by creating objects by calling a factory method — either specified in an interface and implemented by child classes, or implemented in a base class and optionally overridden by derived classes—rather than by calling a constructor.
Sequence diagram
![Factory Method sequence diagram](./etc/factory-method-sequence-diagram.png)
## Programmatic Example of Factory Method Pattern in Java
The Factory Method approach is pivotal in Java Design Patterns for achieving flexible and maintainable code as we see in the following example.
Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB