A very nice functionality that is built into the Delphi RTL (not only FMX) is contained in the System.Messaging unit. In this section, we are going to learn about this feature and how to take advantage of it in many situations where communication across different code parts is crucial. This also includes async events related to touch, gesture recognition, dialogs, and more.Â
Basically, it provides a customizable, pluggable, publish-subscribe mechanism that can be used by application developers to bend toward an event-driven approach. This is especially useful while dealing with asynchronous interactions and, generally speaking, it is a good way to keep dependencies low (resulting in loosely coupled code).
This mechanism is used inside the FMX framework to provide some functionalities (that is, some OS-to-application interactions such as requesting an image from the system's image library or camera). We have seen it in action in Chapter 8, ...