In order to edit any portions of the Movies CMS system, the user has to log in to the system to do so.
To log in, the user clicks on the Administration menu, and selects Login.
The user then has to provide his username and password. The system generates a MD5 hash of the password, and attempts to locate a user with the same username and MD5 hash. If a match occurs, the system has found the user!
Since each row in the Users table represents a single user, the specific row containing the matched user is now the current row. The system then increases the LoggedOnCount by 1, and stores the current date/time into the field LoggedOn.
Similarly, when the user logs off, the system locates the row specific to the user, and stores the current date/time into the field LoggedOff.
In 2017, with the release of Delphi 10.2 Tokyo, Embarcadero introduced a specialized implementation of the Observer pattern into the System.Classes unit. While it has been in the wild for 9 years, it remains a "hidden" architecture for many, primarily because it serves as the invisible engine behind LiveBindings. Other than live bindings, you can also use the Observer pattern as a way to update component settings to the Windows registry, an .ini file, or persist it elsewhere.
System.Classes