[comp.sys.mac.programmer] design suggestions needed for groupware application

roseman@cpsc.ucalgary.ca (Mark Roseman) (05/21/91)

The project I'm currently working on is an object-oriented group drawing
program.  It's still in the early stages, and there are a few design 
choices I'm unsure about, so I'd like to tap some net.wisdom here...

This is primarily a research exercise, and we're more concerned about
getting the underlying "sharing" techniques correct.  As such, the code
that handles that is staying fairly seperate from the user interface
code, as in the following:

   ---------------   ------------------   -----------
   | Application |---| "Sharing" code |---| Network |
   ---------------   ------------------   -----------

Where the different boxes are connected with some queues and message passing.
For instance, the application may send the sharing code a message saying
that its cursor has moved or that its tried to grab a particular object.  The
sharing code would interpret this, and in this case send out appropriate
messages through the network to other machines, and send a message back to
the application saying it can take control of the object.

One of the main goals is the portability of the sharing code.  This means
portability to perhaps other Mac environments, or to other systems altogether
(e.g. Unix).  Its being written in Think C, using just some simple list
classes, plus classes derived from "CObject".  From the feedback I 
received, converting something like this to C++ wouldn't present much of
a problem (though converting back would).

At present, the "application" chunk is written using standard Mac stuff,
based on MacUser's GenApp.  I'm considering using TCL for the application
however.  Is this a feasible idea?  Consider the following:

   * multiple "cursors" need to be supported
       --> application must frequently check cursor position, send msg to
           sharing code, as well as get info from sharing code about other
           people's cursors (through queue as normal

   * cursors should be bigger than standard size
       --> need to do bitmaps etc. for cursors, rather than use the system
           cursor (while in drawing space anyway!)

   * multiple objects need to be created at same time
       --> e.g. two users create boxes, both screens should show boxes being
           created (i.e. simultaneous rubberbanding)

Contention etc. will be handled by the sharing code, so no problem there.
If I did use TCL, what suggestions would you have for how to integrate these
things?  For instance, where do I put in my cursor routines?  From what
class should these shareable objects subclass from?  Might the "Object
Class" sample provide a good basis?

Any hints or suggestions are very much appreciated.  Thanks very much!

Mark
-- 
==============================================================================
Mark Roseman
Dept. of Computer Science, University of Calgary, Calgary, Alta.  T2N 1N4
(403) 220-5769   roseman@cpsc.ucalgary.ca    {ubc-cs|alberta}!calgary!roseman