[net.micro.mac] Mac program portability, etc.

elwell@osu-eddie.UUCP (Clayton M. Elwell) (12/06/85)

Even with all of the differences between window handling, event handling,
and the rest of the user interface libaries, you CAN make Mac-style
programs portable, so that they can be recompiled (or at least easily
ported) between Macs, Amigas, Atari STs, SUN Workstations, MicroVaxen,
etc.  The basic idea is what's called modular programming.  Before you
become nauseous, I'm using this term in a very limited sense:

Isloate the hardware/OS details in their own set of routines.  I have a
set of routines for (of all things) an IBM PC under VANILLA MS-DOS
that allow me to put up alerts & dialogs, do menu selection, etc.
It wasn't that hard.

I have the GEM programmer's guides, and I've looked closely at the Amiga
documentation.  I also finally grok Sunwindows.  The key to writing
a portable application is to decide on your user interface at a relatively
high level so that you can write modules that isolate the machine
dependencies.  This won't change the 'flavor' of the interface.  On a Mac
it will Macish.  On a SUN it will Sunish (?).  On an Amiga it will be
Amigaish (??).  Anyway, so much for the cute adjectives.  The point is
it's not only possible, it's not very difficult.

All it takes is a little skill and self-discipline.  Maybe that's too
much to ask from hobbyists.  I hope not.

-- 
				-- Clayton Elwell
				Elwell@Ohio-State.CSNET
				Elwell%Ohio-State@CSNET-RELAY.ARPA
				...!cbosgd!osu-eddie!elwell
-----------------
Remember: There is no gain without amplification...

breuel@h-sc1.UUCP (thomas breuel) (12/07/85)

> Even with all of the differences between window handling, event handling,
> and the rest of the user interface libaries, you CAN make Mac-style
> programs portable, so that they can be recompiled (or at least easily
> ported) between Macs, Amigas, Atari STs, SUN Workstations, MicroVaxen,
> etc.  The basic idea is what's called modular programming.  Before you
> become nauseous, I'm using this term in a very limited sense:
[...] 
> All it takes is a little skill and self-discipline.  Maybe that's too
> much to ask from hobbyists.  I hope not.
>
> 				Elwell@Ohio-State.CSNET

This goes a bit too far. If you will take the time to come up with a
nice, general programming interface for workstations and implement
library routines for the popular micros, fine. Your efforts will be
greatly appreciated (provided that you produce a functional product and
place it in the public domain; personally, I think that the Macintosh
programming interface can only improve in such an undertaking).

However, I am afraid that you grossly underestimate the amount of time
and effort involved in such a project. Given also that most people
don't even have access to all the machines you mention, you can hardly
expect many Mac programmers to spend much thought on guessing how a
program could be easily ported to, say, an Amiga.

						Thomas.

jimb@amdcad.UUCP (Jim Budler) (12/14/85)

In article <925@osu-eddie.UUCP> elwell@osu-eddie.UUCP (Clayton M. Elwell) writes:
>Even with all of the differences between window handling, event handling,
>and the rest of the user interface libaries, you CAN make Mac-style
>programs portable, so that they can be recompiled (or at least easily
>ported) between Macs, Amigas, Atari STs, SUN Workstations, MicroVaxen,
>...
>I have the GEM programmer's guides, and I've looked closely at the Amiga
>documentation.  I also finally grok Sunwindows.  The key to writing
>...
>All it takes is a little skill and self-discipline.  Maybe that's too
>much to ask from hobbyists.  I hope not.

Have you tried it?  It's all very well to sit there with all the
documentation and say it's easy.  But most of us 
	1) Don't have the documentation for all these systems.
	2) Don't have these systems to experiment.

I've spent many hours porting Megamax and Aztec C source to Mac C.

If you can get the various C developers to agree on a 'standard' on 
one machine, and then get the C developers on ALL machines to adhere
or at least approach this 'standard' I might believe in your approach.
Meanwhile, back in reality I am going to spend my time getting the code
working.

When I have to spend hours getting a routine working on one tricky system 
with full documentation, I am not likely to spend many times that trying to 
make it portable to a system for which I have NO documentation.

The extent of modularity you can expect from me is the normal extent of
good programming practice: output call go to an output routine,
input calls go to an input routine.

The documentation for MY system cost me $$, do you expect me to 
spend the $$ on documentation for YOUR machine?  I'll spend
it on MY machine.


>
-- 
 Jim Budler
 Advanced Micro Devices, Inc.
 (408) 749-5806
 Usenet: {ucbvax,decwrl,ihnp4,allegra,intelca}!amdcad!jimb
 Compuserve:	72415,1200

Bogus newsgroup: net.news: Move to end of .newsrc[yn^L]?

Don't be dictators, use thought.