[net.lang.c] windows ad portability?

lerner@isi-vaxa.arpa (Mitchell Lerner) (12/12/85)

>>An article was recently posted Net.lang.c comparing Sun Tools and the
>>Mac user interface toolbox.  Its main points can be summarized as follows:

>>	The Mac's software interface is incredibly machine dependent and 
>>		very cumbersome.

>>	The Mac's window system is "quick" and "dirty" compared to the
>>		Sun's.

>>	Sun Tools provides a much higher level of interface than does
>>		the Mac.

>>While recognizing many weak points in the design of the Mac (very
>>limited memory, disk space and compute power compared to a
>>Sun/Apollo/Lisp Machine).  I consider its user interface to be a
>>strong point compared to these machines.

Again, I state that the comparison between the Mac and the Sun is not 
fair due to the fact that they are each a separate class of computer.


>>The user interface components on Mac: the dialog manager, the menu manager, 
>>the control manager, the resource editor and MacApp seem far more capable 
>>of supporting a high quality user interface than does SunTools 
>>(moreover the documentation for Mac seems much clearer than that for the Sun).  

>>Since I last looked at the Sun documentation they have added a CGI and
>>are working on a new user interface and better documentation.  However, 
>>I am told by those who have to program to this interface that this is 
>>still dificult.


Mark,

I dont know what version of Suntools you looked at or programmed
under (and the difference between 1.x and 2.x is large) but I was able to 
crank out a reasonably complex user interface with the Panel Subwindow Package
that included "Menus" for everything, "Toggles" (Iconic thingies 
marked "on" or "off"), "Buttons", "Message windows", "Silders" (slide bar),
"Type-in" windows (allow users to type in test items), "Choices" and a TTY 
emulator subwindow. I read the documentatin and wrote this program with no 
prior exposure to "graphics programming" or Sun software in about a week.

My Sun programming experience is with versions 2.x of Sun Unix.

I've also used both Sun and Mac documentation...

When I first learned that I was to be programming a Mac I sought out documentat-
tion, first to find and incredibly 68k based book called Inside the Mac. I
was warned that many examples are wrong and that the book is very confusing
If you are not a 68k wizard (and even if you are!).  The book is not a book 
about programming the
Mac (examples and top down approach to complexity) as much as it is about Mac
system internals.  I do not have time to learn the internals just to write
an application!

A little repreave came when someone pointed me toward two books: Macintosh
Revealed vols. 1 & 2.
 
This book is well written and geared toward writing software on the Mac.
It includes many helpfull examples and all of the system calls In both 
68k and some sort of Pascal.  However, and this is and has been my
main point about programming on the Mac; one MUST COMPLETELY digest
vol1 and strenuously identify with vol2 BEFORE one can start succesfully
programming the Mac for ANY application.

For my first Sun effort I read about 30 pages once, then used those pages
as a reference. Never have I need to go to any of the "lower level" layers
while using the Suntool layer.

Programming on the Mac is a MUCH more complex task for generaly trivial
applications (e.g. graphics based user interfaces) than on the Sun.

Debugging on the Mac is entirely more at the "internals" level than on the
Sun. And one finds some very inscrutable bugs on the Mac.

Again, I MUST say that this is not a "fair" comparison (for reasons mentioned
I am only pointing toward the Sun user interface support as a product well made 
and easily used (just a step in the more "right" direction).  

						Sincerely,

						Mitchell

tim@ism780c.UUCP (Tim Smith) (12/14/85)

In article <600@brl-tgr.ARPA> lerner@isi-vaxa.arpa (Mitchell Lerner) writes:

> When I first learned that I was to be programming a Mac I sought
> out documentattion, first to find and incredibly 68k based book
> called Inside the Mac.

The book is called _Inside Macintosh_.  The only parts that are "incredibly
68k based" are the parts for the assembly language programmer.  I would
expect those to be 68k based, since that is what is in the Mac!

> I was warned that many examples are wrong and that the book is very
> confusing If you are not a 68k wizard (and even if you are!).

The descriptions of Quickdraw, the window manager, the menu manager,
and the event manager were quite clear, as was Text Edit.  The section
on controls was fairly clear also.  This covers nearly everything you
need to write an application if you are using a reasonable development
system.  What did you find unclear?

> The book is not a book about programming the Mac (examples and
> top down approach to complexity) as much as it is about Mac
> system internals.  I do not have time to learn the internals just
> to write an application!

Right.  It's a description of the Macintosh operating system, written
for experienced programmers.  It shouldn't try to teach programming any
more than, say, the VAX architecture handbook should try to teach
programming, or the ANSI C standard should try to teach C.

You don't have to read all of _Inside Macintosh_ to write an application.
Most programmers will only have to deal with a few chapters ( Quickdraw,
the window, menu, event, resource, and control managers, and maybe the file
manager.  If you are writting in C, you can use stdio for your file stuff,
so forget the file manager. )

Did you read all of the UNIX documentation before you started writting
UNIX programs?

>A little repreave came when someone pointed me toward two books: Macintosh
>Revealed vols. 1 & 2.
>
>This book is well written and geared toward writing software on the Mac.
>It includes many helpfull examples and all of the system calls In both
>68k and some sort of Pascal.  However, and this is and has been my
>main point about programming on the Mac; one MUST COMPLETELY digest
>vol1 and strenuously identify with vol2 BEFORE one can start succesfully
>programming the Mac for ANY application.
>

All one has to do is skim IM ( _Inside Macintosh_ ) to get an idea of
where things are.  You then simply read in detail the parts needed for
your application.  For example, when I got my C compiler ( Megamax ), I
read the chapters on Quickdraw and the window manager.  That is sufficient
for putting up windows and doing output.  A short time with the event
manager, and windows could then be dragged around, resized, and brought
to the front.  Then I read and implemented menus.  Next was text edit.
Then desk accessories.  Then controls.  Sure, if you sit down and say,
"This is my first Mac program.  I am going to do _everything_", you will
probably have to read everything in IM, but if you instead say, "This
is my first Mac program, so I will add on feature at a time till I
support the full user interface", you will find that you can get started
quickly, and you will not have to read a lot.

--
Tim Smith       sdcrdcf!ism780c!tim || ima!ism780!tim || ihnp4!cithep!tim