An HDML card can explicitly define the action to take when certain keys are pressed. Variables are client data that can be substituted directly into HDML by the user agent. For each message, the sub-menu is the same except for the identity of the message to operate on. With HDML variables, the message identity can be stored in a variable allowing all messages to share the same sub-menu of operations. This results in both a dramatic savings of cache space in the user agent and a reduction of network bandwidth.
Variables also allow data to be shared between cards.
This provides a means by which the user can navigate through a series of cards to build up a data set that is sent to the server in one final request. This is not unlike HTML forms, except the fields are spread across several cards, and the values can be used in a wider variety of ways. One application of this we have found particularly useful is a centralized preferences service. The preference service provides a cached set of cards which return the preferences settings in variables. This allows applications to utilize centralized preferences without incurring network overhead.