Newsgroups: comp.sys.amiga.advocacy
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!stanford.edu!neon.Stanford.EDU!torrie
From: torrie@cs.stanford.edu (Evan Torrie)
Subject: Re: IAC (was Re: Clipboard (was Re: The Amiga's Future))
Message-ID: <1991Jun8.183629.18012@neon.Stanford.EDU>
Sender: torrie@neon.Stanford.EDU (Evan James Torrie)
Organization: Computer Science Department, Stanford University, Ca , USA
References: <1991Jun8.030855.18976@neon.Stanford.EDU> <1991Jun8.044840.1404@mintaka.lcs.mit.edu> <1991Jun8.074935.781@neon.Stanford.EDU> <1991Jun8.090052.12906@mintaka.lcs.mit.edu>
Date: Sat, 8 Jun 1991 18:36:29 GMT
Lines: 136

rjc@geech.gnu.ai.mit.edu (Ray Cromwell) writes:

>In article <1991Jun8.074935.781@neon.Stanford.EDU> torrie@cs.stanford.edu (Evan Torrie) writes:

>>  Just as a question, to what extent is Amiga IPC standardised?  I take it
>>that Arexx is the method of standardisation?  Who defines Arexx?  How does 
>>one program know what messages another program can accept?  Are there 
>>set messages defined for things like "Drag this object to this location"?

>  Arexx is now the "standard" format for IPC messages not only
>because it is flexible, but because you get an interpreted language
>to boot. Until recently, Arexx command names were left up to 
>the implementator (for instance, almost all Amiga editors have an
>Arexx port, but most of them had different names for the commands
>that do the same thing on each ,like mark a block of text, etc)

  This is where the idea of a central repository for defining
and standardising these events is critical.

>  It's not an easy problem to solve. Sure you can standardize some
>commands, but what about really localized features. Suppose a paint
>program had a command to "draw a closed bezier curve with parameters
>foo,bar,baz and fill it with the inverse of the background behind it."
>How is a word processor supposed to know about this feature and
>use it ? SImple, it can't. 

  Not strictly true.  For example, the following comes from a 
description of Apple's Open Scripting Architecture.
  "The architecture includes a set of standard Apple events and a mechanism
for applications to tell other applications which standards they support.
Standard events are those that have been defined as open standards by
Apple or committees of developers and listed in a registry maintained
by Apple.  They are designed to give programs a way to tell others to
perform common operations, such as dragging an object from one location
to another, as well as genre-specific functions, such as selecting
a range in a database.
  Under the new architecture, developers will need to add an Apple
Event User Terminology resource to their IAC-aware applications.
Scripting environments will check the resource to determine which events
a program supports."

  I can see it being developed to the point, where a program will be
able to tell the scripting environment say, that it supports a command
called "Draw closed bezier : takes 3 parameters", and the scripting
environment will be able to treat this as a new command.
  Then, you'll be able to add a menu command to your word processor, 
which uses the scripting environment to send this message to your drawing
program.

>A lot of Amiga programs boast over 100
>arexx commands and there simply isn't a way to standardize every
>function every type of program could have (editors, compilers, paint
>programs, renderers, publishers, image processors, etc). 

  No, but you should try to standardise as much as possible, otherwise
you end up with different developers defining different commands for
the same function (as you mentioned has happened with editors in the
Amiga world).

>Imagine
>the frustration of a programmer who would have to implemented
>support for that many functions. 

  An application only has to support those events which make sense
to his application.  Presumably, "Draw Bezier curve - 3 parameters"
doesn't make sense to a text editor application.  If the program is
organised in the right way (this is also something Apple is strongly
promoting), you should separate your user interface code from the 
actual mechanics of the operation code - hence, adding support for
an event to "select a block of text" should be just a few lines of 
code which calls the "mechanics" procedure, bypassing the user
interface code.

>The simply solution is to define
>a small set of Arexx commands every program should accept
>(open file, save file, print file, help, close file, quit, cut, paste)
>The rest is left up to the user to create simple macros that use
>the more complex commands that are not standardized.
>  Will Mac programmers add more IAC commands other than the small
>standardized set?

  Well, it's too early to tell, but the whole idea of Open 
Scripting Architecture is meant to recognise the fact that events beyond
the std open, close, quit commands are crucial to the success of IAC.
  Deneba have already added support for custom Apple events to their
Canvas 3.0 drawing program, providing a command for every single function
of the program.

>>  Does Amiga IPC work across a network (I'm asking, I don't know)?
>>i.e. can one Amiga program send a low-level message to a program on
>>another machine?  That's one of the more powerful features of System 7
>>IAC vs for example, Microsoft's DDE.  IAC is totally transparent
>>across the network.

>  I call as evidence, Parnet/Sernet on the Amiga, also Matt Dillon's
>NFS-Handler NF0: which lets me mount the entire Unix device list
>on my Amiga and access it as a normal device. (e.g. I can
>cp dh0:myfile to nf0:home/users/mydir, or use it from workbench)

  Yes, but is this using the same IPC mechanisms as ordinary applications
use.  I've been able to mount remote devices on a Mac for the past 
5 years, but it certainly wasn't using IPC to do it.  It was just using
a customised device handler.
  I'm talking about running your scripting environment on one machine
in the network, and being able to write a script which says something like

  open Pagemaker on machine Saturn
    send "FlowText" && text of item 3 to Saturn:Pagemaker
    send "Save Document" to Saturn:Pagemaker
  close Pagemaker on machine Saturn

>>  For example, as mentioned above, Apple has enforced a standard that
>>all applications being developed now and in the future should support
>>at the very least required and core Apple events.  Is there any such
>>standard on the Amiga, or is it left up to the developer?

>  Amiga events don't say 'Open','Close', 'Quit'. Amiga events say
>'MENUPICK, the user pressed MENU X' 

  How does a scripting environment "know" where the Quit command is 
then?  What happens if the program doesn't have a Quit command, but
instead just uses the Close of a window to exit the program?  
  Or, if the Font menu (for example under change of Font) is really
a hierarchical menu under a Format main menu?  Or even, fonts can
only be changed via a Format dialog box (often the case with non
word processors - e.g. spreadsheets and databases)?  By moving the
level of abstraction up one, you can have "SetFont to Helvetica" as
a command which a scripting application can send to any program, 
not having to worry how the user interface of that program actually
implements "SetFont".

-- 
------------------------------------------------------------------------------
Evan Torrie.  Stanford University, Class of 199?       torrie@cs.stanford.edu   
"I didn't get where I am today without knowing a good deal when I see one,
 Reggie."  "Yes, C.J."
