docs: add diagrams for decorator, delegation, dependency injection, dirty flag, domain model, double buffer, double-checked locking, double dispatch, and dynamic proxy

This commit is contained in:
Ilkka Seppälä
2025-04-06 15:52:26 +03:00
parent 203548ec03
commit 30d13083ae
18 changed files with 36 additions and 12 deletions
+4
View File
@@ -34,6 +34,10 @@ Wikipedia says
> In computer science, multiple buffering is the use of more than one buffer to hold a block of data, so that a "reader" will see a complete (though perhaps old) version of the data, rather than a partially updated version of the data being created by a "writer". It is very commonly used for computer display images.
Sequence diagram
![Double Buffer sequence diagram](./etc/double-buffer-sequence-diagram.png)
## Programmatic Example of Double Buffer Pattern in Java
A typical example, and one that every game engine must address, is rendering. When the game draws the world the users see, it does so one piece at a time - the mountains in the distance, the rolling hills, the trees, each in its turn. If the user watched the view draw incrementally like that, the illusion of a coherent world would be shattered. The scene must update smoothly and quickly, displaying a series of complete frames, each appearing instantly. Double buffering solves the problem.
Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB