From: jcav@quads.uchicago.edu (JohnC)
Newsgroups: comp.sys.amiga.advocacy
Subject: Macintosh IPC (was Re: Mac OS just sucks -- "ease of use" = "lack of freedom")
Date: 8 Apr 92 17:45:18 GMT
Reply-To: jcav@midway.uchicago.edu
Organization: The Royal Society for Putting Things on Top of Other Things

In article <1992Apr8.165134.26668@ra.msstate.edu> skip@tacky.cs.olemiss.edu (Skip 'AdaX' Sauls) writes:
>In article <1992Apr8.130954.10847@ms.uky.edu> justin@mik.uky.edu (Justin Sullivan) writes:
>>Are you blind? Publish & Subscribe is data transfer.. AppleEvents is  
>>application/system/process control.. The two work in perfect harmony, 
>>they just go by two different names.
>
>Why is there a need for two different names?  I thought that the Macintosh
>philosophy was to make the operation of a computer less complex...

Here's the scoop:

Macintosh System 7 implements inter-process communication.  This is done
through a layered software architecture.  The lowest level is called the PPC
Toolbox (PPC == program to program communication).
According to Inside Mac voume 6:

    The PPC Toolbox provides you with the ability to
	*exchange data with other open applications on the same computer or
	across a network of Macintosh computers
	*browse through a listing of applications that are available to
	exchange data
	*verify user identities for communication across a network

Basically, the PPC Toolbox allows applications to register data ports, to
open sessions between those ports, and to send and recieve blocks of data
across those connections.

The next layer up is the Event Manager, which utilizes the PPC Toolbox to
allow programs to send and receive "high-level events", in addition to the
previously existing "low-level events" (mouse button click, keystroke, etc).
Inside Mac volume 6 defines high-level events like this:

    A high-level event is an event that your application can send to another
    application to send it some information, to receive from it some
    information, or to have it perform some action.

Apple Events are merely high-level events with data structures that follow
the definitions of published protocol.  The formal name for it is the Apple
Event Interprocess Messaging Protocl (AEIMP).  According to IM-6:

    Apple events provide your application with a standard mechanism for
    communicating with other applications.  You can use Apple events and the
    Apple Event Manager to
	*respond to the required Apple events (Open Application, Open
	Documents, Print Documents, and Quit Application) that are sent by the
	Finder
	*respond to the Apple events sent by the Edition Manager and allow
	users to share data among documents created by multiple applications
	*provide services to other applications
	*request services from other applications

    Apple events fall into one of several broad categories
	*Required Apple events consist of four core Apple events that the
	Finder sends to applications.  These events are called Open Documents,
	Open Application, Print Documents, and Quit Application.  They are a
	subset of the core Apple events.
	*Core Apple events are used by nearly all applications to
	communicate.  The suite of core Apple events is described in the _Apple
	Events Registry_; Apple recommends that all applications support the
	core Apple events.
	*Functional-area Apple events are supported by applications with
	related features.  Apple events related to text manipulation for
	word-processing applications and Apple events related to graphics
	manipulation for drawing applications are examples of funtional-area
	Apple events.  Functional-area Apple events are defined by Apple in
	consultation with interested developers and are published in the
	_Apple Events Registry_.  Apple recommends that all developers support
	functional-area Apple events appropriate for their types of
	applications.
	*Custom Apple events are defined by a developer for use by the
	developer's own applications.  You can choose to publish your Apple
	events in the _Apple Event Registry_ so that other applications can
	share them, or you may choose to keep them unpublished for exclusive
	use by your own applications.

The Edition Manager implements a suite of Apple events that support "live
cut-and-paste".  Publish-and-Subscribe is merely the user-interface for the
Edition Manager.

I hope this clears up some confusion.


-- 
John Cavallino                  |  EMail: jcav@midway.uchicago.edu
University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
B0 f++ c+ g+ k s++ e+ h- pv     |         Chicago, IL  60637
Newsgroups: comp.sys.amiga.advocacy