Design notes

Separating the handler from its clients

This program separates the handler from the Caucus Framework. Clients only interact with the MChatHandler protocol--they do not need to know how a particular handler implements the Taligent Chat protocol. TChatHandler is the only object that is aware of its foundation in the Caucus framework.

The model owns TChatHandler

The model (not the presenter or views) owns TChatHandler. TChatHandler is not associated with a particular view. In fact, this handler can function in an environment with multiple views. The model owns the handler because it deals with data (text messages that are sent to caucus members). Having the Taligent Chat handler in the model also separates Taligent Chat processing from a particular presentation.

Processing a message

When an incoming Taligent Chat protocol message arrives from a client using the caucus, the handler processes it and distributes a notification to multiple recipients. Recipients consist of clients who have set up notification in this interest. For example, TChatView registers interest in any new messages.

Simplified interface

To simplify the user interface and to prevent user confusion, Taligent Chat protocol semantics (join, leave, submit) cannot be reversed or "undone." For example, a user cannot specify undo after receiving and submitting messages within a Taligent Chat discussion as it might be unclear which message to undo--the last message received from another member or the last message submitted to a Taligent Chat discussion.

Announcing a new member

This program supplements the Caucus framework by informing each existing member of the name of a new discussion member.

Semaphores and locks

This program does not implement shared data mechanisms like semaphores or locks to build access to a thread-safe buffer for incoming messages. Instead, this program uses notification to perform this operation as buffering is not always necessary.


[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