🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #4983

Re: software ICs vs. libraries

#4983
From: lsr
Date: Thu, 05 Nov 1987 20:41
58 lines
3078 bytes
In article <951@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes:
>
>I'll have to disagree with that. The MAC toolbox violates a fundamental law
>of O/S design: FIRST, make the easy things easy. You should be able to
>operate like this (enter fantasy mode):
>
>	Window = OpenWindow(x0, y0, x1, y1, xmax, ymax, 0);
>
>This gives you a minimal window. It gives you a window of size (x1-x0) by

You are absolutely right that the Macintosh does not provide BUILT-IN higher
level calls such as this.  

One problem you run into is what if you don't want a window with 1 "pane";
you want a window with 2 panes each with its own pair of scroll bars.  So
you need the lower level calls as well as higher level calls which handle
common cases.

This leads to the idea of software libraries, which provide the higher level
calls.  There are a couple such libraries for the Macintosh.

Libraries, however, only move the problem one step further out.  If you want
to do something not provided in the library, you have to program it from
scratch.  Perhaps, you can take advantage of some of the othe rsubroutines
in the library, but often you can't.

That's where object-oriented programming starts helping.  When a program is
structured using objects and methods, then it is possible to override 1
particular method and inherit the rest unchanged.  With a library of
routines, you either call the routine or not, you can't modify how it works,
except by varying the parameters.

>I don't know of any system that's this sophisticated, though the Amiga
>SuperBitmap windows are fairly close. Maybe XWindows or NewS.

That's the approach we took with MacApp.  MacApp handles all the common
details of a Mac program, while providing the flexibility to customize the
way it works.  

Once you define a method to draw your window, for example, MacApp can use
that method to implement window updates, scrolling, and printing.  To save a
document to disk, you only have to define the method which does the I/O;
MacApp takes care of creating the disk file, opening it, making sure there
is disk space, etc.  You don't have to worry about moving or resizing
windows, scrolling, printing, etc.; these details are handled automatically.




-- 
Larry Rosenstein

Object Specialist
Apple Computer

AppleLink: Rosenstein1
UUCP:  {sun, voder, nsc, mtxinu, dual}!apple!lsr
CSNET: lsr@Apple.com
Technical Details
Message-ID: <6644@apple.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!batcomputer!pyramid!voder!apple!lsr
References: <3405@ece-csc.UUCP> <638@its63b.ed.ac.uk> <1811@watcgl.waterloo.edu> <1270@csib.csi.UUCP> <951@sugar.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!batcomputer!pyramid!voder!apple!lsr
From: lsr@apple.UUCP
Newsgroups: comp.lang.misc
Subject: Re: software ICs vs. libraries
Message-ID: <6644@apple.UUCP>
Date: Thu, 5-Nov-87 15:41:19 EST
Article-I.D.: apple.6644
Posted: Thu Nov  5 15:41:19 1987
Date-Received: Sun, 8-Nov-87 09:29:39 EST
References: <3405@ece-csc.UUCP> <638@its63b.ed.ac.uk> <1811@watcgl.waterloo.edu> <1270@csib.csi.UUCP> <951@sugar.UUCP>
Reply-To: lsr@apple.UUCP (Larry Rosenstein)
Organization: Advanced Technology Group, Apple Computer
Lines: 58