🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cis.comp
Article #2

[Another way of programming]

#2
From: Eureka
Date: Sat, 15 Jun 1996 00:00
184 lines
9748 bytes
�O�o�W�Ǵ��h�����ҧ�L�@����t���Ǫ�, �L show �@�ӵ{�����ڬ�, 198x �~���F�F
�o�ӵ{��(or development environment, actually)�N�O������i�o�� CASE.
���L, �ڤ��M���ӵ{���{�b���h�V, ���L, �ˬO���D�@�ӥs Prograph �� development
environment, �O�� ���y�{�Ϫ��覡��"�g"�{��, �H�U�O�K��TidBITS 312/29-Jan-96
�����.

���Ǫ�ιL Prograph ��! �ӽͽͧa!

�b TANet Mac newsgroup ���H�o�_, �զ� TidBITS Big-5 Team, �q�Ƹq�Ȫ�½Ķ
TidBITS �峹���u�@, �ثe�w½Ķ�F: 315~324. �Y���N�n������, �в��r�� mac
newsgroup �߰�. 

p.s. ��...�ڤ]�O B5 Team ���@���! �i�O���٨S����½�L�@�g�峹...����!
�����ڤ@�w½!

p.s.s. �ڭ��d�F�@�U TidBITS �����v��, �����u�n�O�d "full credits"
�N�i�H�ϥ�...�ڳo��...��a!! 

the following is by Matt Neuburg <managing_ed@mactech.com> 

>-------------------------------------------------------------------------

Get Your Hands on Prograph

by Matt Neuburg <managing_ed@mactech.com> 

This past August, Pictorius, a company based in Halifax, Nova
Scotia, announced plans to release a freeware version of its
flagship product, Prograph. The version appeared in the
Info-Mac archive in early November. Now it's a funny thing,
but when a program lists for around $1,500 (as Prograph once
did) or even $700 (as the current version does), no matter how
much I read about it, the discussion somehow fails to make any
great impression upon me. On the other hand, when something
is free, I'm interested. 

ftp://mirror.aol.com/pub/info-mac/dev/prograph-classic.hqx 
ftp://mirror.aol.com/pub/info-mac/dev/prograph-reference-manual.hqx

ftp://mirror.aol.com/pub/info-mac/dev/prograph-tutorial-examples.hqx

ftp://mirror.aol.com/pub/info-mac/dev/prograph-tutorial-manual.hqx

[The whole package comes to about 4 MB. -Geoff] 

Prograph is an environment in which you develop computer
programs graphically. Instead of learning a lot of verbal syntax,
so that you can (presumably) say and read things like this: 

 if (inModelID == SCPage::modelKind) {
   if ( mPagelist -> FetchAItemt(inPosition,&page) ) {
     PutInToken(page,outToken); return; }}

...you essentially just draw a diagram showing the flow of data
from one operation to another. These diagrams are not
somehow "translated" into a "real" programming language by
Prograph; they are the language. 

I had always been skeptical about Prograph, chiefly because of
an obvious drawback of its approach: your program can't be
documented in a small space. What you could express as a few
lines of text in Pascal or C might take up a whole screen in
Prograph. However, since it was free I downloaded it, opened
the tutorial, and plunged in. 

The tutorial is splendid. It's brilliantly written, with a keen eye
to the thought processes of the reader. Every time I found
myself thinking, "But what if I'd done it this other way
instead?", or, "What was that funny-looking symbol you made
me use there?", a discussion of that very question would follow.

I soon found that I was having a great time and picking up the
language with far greater ease than any programming language
I had ever learned. After I completed the tutorial (which took a
few days), I fixed on a project to test myself: an elementary
card- playing program. I had no difficulty creating a "deck"
object and supplying it with a few "methods," such as getting it
to shuffle itself, deal a card off its top, and so on. As you may
have guessed, Prograph is object-oriented, and it makes
object-oriented programming supremely natural and easy.
Each object class is an icon, and its methods and attributes
seem literally to live inside it - double-click a class icon, and a
window with its methods or attributes appears. This is vastly
better than describing an object textually in C++; it's more like
HyperCard, where the script of a button lives inside the button. 

Then I decided to get fancier and start putting up some menus
and windows like a real Macintosh program. Prograph has an
Application framework that takes care of the basic Mac
interface for you: it comes with classes and methods (written in
Prograph, of course) that handle the event loop (responding to
mouse clicks and drags in menus and windows) and has an
easy graphical menu and window editor so you can just draw
the window you want your program to use (without having to
resort to ResEdit). However, I soon realized that you don't get
to throw away your multi-volume collection of Inside
Macintosh. I wanted to put up a "thermometer" progress
window, which the user could watch while my deck was
shuffling. I got the window to come up when the shuffling
started, and to vanish when it ended, but for some reason no
drawing was getting done: the thermometer wasn't appearing.
Finally, I discovered the problem: I had to put up the window
and then stop, letting the event loop take over, and let the
repeated Null events trigger Idle actions that would advance the
thermometer, just as you might do if you were writing the same
routine in C. Once I did this, the thermometer worked perfectly.
So, if you want to write a Mac program with Prograph you still
must learn to program the Mac; Prograph doesn't take care of
everything for you the way HyperCard does. I can tell you from
experience, though, having tried to write the same sort of
program in C++ that Prograph is vastly easier. 

I found the writing process incredibly fun, because the
Prograph milieu is totally dynamic. You don't have to get every
single routine right in order to try out a program; there's no
compiler that won't let you get started if you don't have
everything just so. Instead, you start running your program,
and if it makes an "error" Prograph pauses and lets you fix it.
For instance, when I wrote my shuffle thermometer, I wrote
the loop that advances the thermometer, but I didn't bother to
say what was supposed to happen when the loop had iterated
the total number of times. So I started my program, and after
advancing the thermometer, Prograph stopped and put up a
dialog saying, in effect, "You need a routine here that you
haven't written. Would you like to write it?" I said "yes," wrote
the routine (to close the thermometer window), and Prograph
then picked up in my program exactly where it had left off, and
proceeded to close the window! Even cooler, you can pause a
running program and examine what data is being handled;
thus, your "code" (the data-flow diagram you drew) becomes
its own debugging tool. If you find an error, you can insert a
corrected value, or back to some earlier routine that caused the
problem and rewrite it (in which case Prograph rolls back to
that earlier point and carries on from there). 

I can't say enough about how neat, easy, and satisfying I found
Prograph, but I can't describe it adequately, either; in fact, no
description I've read has done it justice. You have to experience
it. Even if you've never done any programming - perhaps
especially if you've never done any programming - you'll pick
it up right away. 

The freeware release, called Prograph Classic, isn't crippled; it
was the current version once upon a time. The only hitch is
that if you want to save a program as stand-alone (instead of
running it at low speed inside the Prograph interpreter), you
must buy a compiler for a mere $25, which Pictorius calls a
shareware fee and has promised to donate to charity. Once
you're familiar with Prograph Classic, if you're curious about
newer versions, check out: 

http://www.mactech.com/Articles/Vol.10/10.03/Prograph-Review.bhtml

http://www.mactech.com/Articles/Vol.10/10.11/Prograph-CPX-Tutorial.bhtml

I'm not saying you'll rush out and spring for the current
version, but I think you'll agree that Prograph is to
programming as Macintosh is to computers. The Pictorius
folks are to be strongly commended - and thanked - for this
free release, a gift that lets Mac users have a wonderful
experience they would otherwise be denied. More software
companies should pursue this policy of releasing outdated
versions as freeware. 

http://www.pictorius.com/ 

[Addendum: EveryDay Objects, Inc. has developed a set of
Internet classes and primitives for Prograph that have been
used to make a Web server that queries a database and returns
Web pages generated on the fly - their demo at Macworld
Expo was pretty neat. - Geoff] 

http://www.pla-net.net/edo/ 


--
>    Welcome  to  S.A.Y., the digest of  TANet Mac newsgroup    <
>       URL: gopher://gopher.cis.nctu.edu.tw:70/11/eureka       <
> My homepage is here: http://cissun51.cis.nctu.edu.tw/~is84007 <

< is84007@cis.nctu.edu.tw >
< eureka@cismac.cis.nctu.edu.tw >
< Eureka, �^�p > 
Technical Details
Message-ID: <4ptvql$2kd@news.cis.nctu.edu.tw>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ChineseT,BIG5
X-Google-Thread: f7802,60602b1a2c85dd83
X-Google-Attributes: gidf7802,public
X-Google-Thread: 10c46e,60602b1a2c85dd83
X-Google-Attributes: gid10c46e,public
X-Google-Thread: 13faf6,60602b1a2c85dd83
X-Google-Attributes: gid13faf6,public
From: is84007@cis.nctu.edu.tw (Eureka)
Subject: [Another way of programming]
Date: 1996/06/15
Message-ID: <4ptvql$2kd@news.cis.nctu.edu.tw>
X-Deja-AN: 160443502
organization: Dept. of Computer & Information Science, NCTU, Taiwan
newsgroups: cis.comp,cis.talk,tw.bbs.comp.mac