[comp.sys.mac.programmer] File management

wilson@csli.STANFORD.EDU (Nathan Wilson) (11/08/88)

I'm working on a pascal project in MPW which is slowly getting larger
and larger and was wondering how people manage their files.  What size
limits do people usually work with?  Do you ever have more than one
segments worth of code in a file?  How many source code files do you
work with?  I personally start getting nervous if my files get much
more that 25k and never have more than one segment in a file.  Also
I've noticed that my file dependency tree as described in my make file
is quite tall and not very bushy.  I have a belief that bushy is
better and many small independent files is better than fewer large
files.  Is this belief correct and if so what rules of thumb do people
use to avoid creeping monolithism?  Also I've been wondering for
awhile now if there is a way to avoid the dreaded
recompilation-of-everything-in-sight when you change something at the
bottom of the tree that is important but doesn't change the interface
part of the file.  Finally, I also have a vague memory of someone
mentioning a limit on the number of files that can be linked at once.
Is this true?
	Thanks in advance,
		Nathan Wilson

gwills@maths.tcd.ie (Graham Wills) (11/10/88)

I am working on a statistical graphics package featuring new styles of
dynamic interaction. I write in MacApp/MPW, but have also written a BIG
program in pure MPW (final debugging & marketing it now). I use Pascal only
so far, but some 68000 is bound to creep in soon...

Here is a rough tree for the MPW program

			   MAIN

                       EVENT_HANDLER

    MOUSEDOWNS   WINDOW_HANDLER  MENU_HANDLER  FILER  HELP_HANDLER

    ( extra )    FOR_WIND DRAWER  ( extra )    
    ( files )                     ( files )

The extra files are totally application specific. There are about 6 of them,
each between 20-40K. Also all global variables go into a seperate file, and
I have a MESSAGES ( for general info giving ) CURSOR and some others all
the units use.

These 'just grew'. I tried to put everything that was logically connected into
the one UNIT (Rule: 1 unit 1 file of same name), but if it got too big - if
compile times were too slow - I split it. hence I have several mousedown
blockbusters - including MOUSEDOWNINGRAPH AND OPTMDOWNINGRAPH - each 30K

The one thing I was carefull about was that if I wanted to work on one part
of the program, such as a new menu item, an about window, whatever, I did
not need to use more than one or two units.

Hope that helps - if you want more detail, such as exact sizes etc- Mail me.