|
|
|
NOTE: This Design document is subject to change at any time. |
Message
Syntax: <MESSAGE property-list/>
The zMessage object represents a basic block of information used in zApp. Typically a zMessage represents an email message, but this is not required. Any object that implements the properties and methods of zMessage can be considered a Message in zApp.
Objects can implement additional optional properties as well. For example, when a message header is displayed in a grid, the grid has no idea what kind of object it is really displaying. All that the Grid requires is that the object have properties that match the property names assigned to each column. For example, if you have a column in a Grid with a property name of "Subject", then the Subject property of the Message Object is displayed in that column.
A Message object is responsible itself for implementing any caching or background fetching of the data that is needed to be displayed. For example, a Message has a Body field that provides the full text contained in the message. It is possible for the message to only fetch the large Body text when that property is specifically requested. For example, you don't need to fetch the body property in order to display a message in a Grid that only shows the Subject property. When the user selects the message and requests the Body to be shown in a Memo control, then the Message object is responsible to fetch this body text as needed.
zApp itself does not care how each Message is implemented. The Message might be stored in a disk file, database, or remote server.
A special type of Collection called zMessageCollection implements a background caching and fetching mechanism designed to only retrieve messages as they are needed for display or interaction with the user interface. This zMessageCollection works closely with a zMessageStore which actually performs the low-level fetching of Message objects as needed.
Each message has a unique ID field. This is a string value that can be used to fetch a message from a message store. The ID field starts with the ID of the message store, followed by a hyphen. When eMobius fetches a message, it strips the message store ID from this field and passes the rest of the ID to the message store.
Typically a message store will contain "mailboxes" (folders). In this case, the next part of the message ID will likely be the ID of the specific mailbox containing the message in the store. For example, in a FileStore, the message ID would contain both the directory path and filename of a message file. |
|