Design notes

Changing persistent data

In this program, the model's persistent data is changed through a single command (TChangeChatInfoCommand). Other data that is not persistent, such as the discussion text, is changed directly.

Streaming relevant data

It's not necessary to store the input or output text buffer--this information is specific to the view. On start-up, this program opens with clean input and output views. It is only necessary to stream the topic, host name, and user name, and whether this document is currently joined in a discussion.

Model changes

All model changes are funneled through the notification from the model to the view. This program uses member functions provided by the Document framework including HandleModelChanged to handle notification that a model change has occurred. For detailed information on notification and the view system, see Desktop Concepts.

Supporting mutable data

It is not necessary for this program to store discussion text from one discussion session to another. As a result, Taligent Chat can store non-persistent data, such as the text of the current discussion, outside of the model.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker