[comp.sys.mac.programmer] Book recommendations so far ...

mguyott@eriador.prime.com (03/24/91)

Here is the information that I have received to date about books for
programming the Mac.

	    Book				 Recommended/Mentioned
	    ----				 ---------------------
Macintosh Programming Primer				    4
	by Mark and Reed (2 volumes)
Inside the Macintosh (5 volumes)			    3
Macintosh Revealed by Stephen Chernicoff		    2

The actual recommendations follow:

------------------------------------------------------------------------------

I recommend Mark and Reed, Macintosh Programming Primer.  There is a version
for Think C and one for Think Pascal.  Also, there is a second volume for
Think C.  If you're not planning on using Think C or Think Pascal, I don't
know how useful they will be, but I know there is a lot of general information
about using the toolbox.
-- 
David M. Marcovitz		       |  internet: marcovitz@uiuc.edu
Computer-based Education Research Lab  |	    dmmg1176@uxa.cso.uiuc.edu
University of Illinois		       |  novanet:  marco / cca / cerl

------------------------------------------------------------------------------

Probably the best intro to Mac programming is Stephen Chernicoff's _Macintosh
Revealed_ series, a set of four volumes, although the basics can be learned in
vols one and two. It's written for Pascal users, mainly because the macintosh
toolbox routines are Pascal based. It is fairly complete; vols 1 and 2 talk 
about using the event-driven system and interacting with the operating system,
and resources and windows and menus and controls. Vol 3 discussed printing
and making customized stuff, vol 4 talks about color and Multifinder-awareness.
This is probably the most complete, down-to-earth reference to Mac programming.

The next set of books is probably worthwhile to have. These are _Inside 
Macintosh_, volumes 1-5 (and soon 6). This is the bible according to Apple;
unfortunately, it's more of an encyclopedia, because while it tells you
everything you *can* do, it doesn't really tell you what you *need* to do. 
Which is why Chernicoff's series is very useful. _IM_ lists *all* the macintosh
toolbox routines, what they do, and what they need, all in Pascal. Vol 1 talks
about the basic toolbox "managers", and things like windows, menus, controls,
Quickdraw, resources, et. al. Vol 1 is a must. Vol 2 and vol 3 talk about some
of the hardware and some of the device managers and file managers. Vol 4
talks about newer features and the redesigned file manager, and vol 5 talks 
about color. Vol 1 and 4 and 5 are probably the most useful for the majority of
programs; I have them all, even though I rarely use anything beyond 1.

For C users, the most fun book I found was David Mark's and Cartwright Reed's
_Macintosh Programming Primer_. Note that I said "fun". This was my
first introduction to the world of Macintosh programming. It does what
you asked, pretty much, gives you a set of applications to create
using THINK C, from a "Hello, World" application (including one with
its own application icon) to windows and menus and events and dialog
boxes and printing and scroll bars. There is a second volume which
goes into other areas such as color, control panel devices and INITs,
text editing, and the THINK Class Library (although I'm hoping they
do a more in-depth volume on that. I think a whole book could be
devoted to the TCL all by itself, but what do I know...). The only
problem I have with the two volumes is that they tend to be rather
specific, and not useful as references when it comes time to program
something just different enough from their examples. For instance, the
first volume doesn't really explain that dialog boxes are windows, and
they have to be selected and brought to the front to be used. I had
trouble with that one, and their only Dialog box example didn't help.
They're a good stepping stone, and they do also get you used to using
resources (with the help of ResEdit), so I'll keep buying them. Plus I
liked their writing style. I thought Petzold was a bit smug, in
comparison.

In addition, my library also contains several books on Object-Oriented
Macintosh programming. Notably, Dave Allen's _Elements of C++
Macintosh Programming_, which I am currently using (albeit with THINK
C v4.0, as opposed to MPW C++) to develop a mac version of xconq (an
EMPIRE-like game). This book showed me the development of a Macintosh
user interface from the ground up, which is what I'd like to see Mark
and Reed tackle with the TCL. As an aside, THINK C v4.0 is not C++;
close but no cigar. I converted Allen's MPW C++ code to THINK C, and
with one minor exception, it seems to work fine (I can't get the
scroll arrows to unhighlight when the mouse is let up or taken off).

Anyway, I've found all of these books useful in one way or another. I
bought _IM_, couldn't really use it, bought Chernicoff's books, but
didn't really understand what was going on, bought _MPP1_, and finally
grasped the concepts, and can now use _Mac Revealed_ when I have a
technical point that needs to be resolved. _IM_ is useful when I want
to do something but don't know what to use. Still have to learn the
TCL though.

Karl G. Kowalski				  killer@aerospace.aero.org

------------------------------------------------------------------------------

For programming on the Mac, I suggest using ThinkC and for that, you can get
the Macintosh Programming Primer: Inside the Toolbox Using ThinkC.  There are
now two volumes for this.  Volume one handles basic stuff like making simple
applications with menus and picts and text editing.  Its really thorough.
Then the second volume starts up with CDEVs and INITs and all the extra little
programs that aren't applications and some more advanced stuff.  I know the
first volume has a ResEdit Tutorial in it.  I forget if the second one has
anything on that, but again the book is thorough in this as well.  A good
series, I think.

They suggest using the Inside Mac(volumes I and V are the essentials with
the rest being extra stuff) or the Macintosh Revealed series (only two volumes
to this one).  Those two series explain routines in the Macintosh programming
Toolbox.  They are very useful, but not exactly necessary if you get the Mac
Primer Series.	The above two series are written with Pascal in mind, while
Mac Primer is of course in C.  Mac Primer does start out with Hello World,
giving two versions, and finishing with large applications.
Hope this helps!!					       --Ernie

------------------------------------------------------------------------------

C++ is only available from Apple as part of the MPW shell system.  Think C
4.0 has a class library, but is not a full-fledged implementation of 
C++.  Good Think-C books are Volumes I and II of The Macintosh Programming
Primer (Volume I by Mark and Reed, Volume II by Dave Mark, only), by
Addison-Wesley (roughly $25 each, retail).  They're designed for 
programmers getting used to the Mac, and are not C tutorials (knowledge
of C is presumed).  Sounds like these are what you're after.

John Miller
Music Theory
Eastern Illinois University

------------------------------------------------------------------------------

When porting your prog to the Mac, pay very close attention to the Mac
User-Interface Guidelines.  Reviewers of Mac software love to rip applications
to shreds when they don't follow the guidelines.  For instance: the Windows
habit of creating "hot-keys" in a dialog by using the first letter of the
title of a button doesn't work well on the Mac as certain cmd-key combinations
are already taken, such as cmd-c for Copy or cmd-o for Open.  If you used "o"
for "OK" or "c" for "Cancel", you might confuse lots of folks.	Use <Return>
for the (hilited) default button, and cmd-<period> for Cancel (assuming that
it's not the default...) and you will find that users will accept your
application more readily...

(Almost) every volume of "Inside Macintosh" has a chapter on the Mac
Human-Interface Guidelines and there is a seperate book from Addison-Wesely
that addresses this issue.

Lawson

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English
Internet: Lawson.English@p88.f15.n300.z1.fidonet.org

------------------------------------------------------------------------------
Two of the worst things we teach our children are that a knowledge of science
is nice but not necessary, and a knowledge of sex is necessary but not nice.

Marc Guyott              Constellation Software, Inc.          (508) 620-2800
                         Framingham, Mass. 01701 USA                Ext. 3135
mguyott@primerd.prime.com       ...!{uunet, decwrl}!primerd.prime.com!mguyott