Re: AppKit source available as reference?
Re: AppKit source available as reference?
- Subject: Re: AppKit source available as reference?
- From: Karl Goiser <email@hidden>
- Date: Fri, 29 Jun 2001 10:38:21 +1000
>
Personally, I'd rather have a well-designed framework than
>
one which requires you to look through the source code to
>
figure out how to use it.
Maybe I'm not a typical programer. My experience of working with the
source code in MacApp and Smalltalk is singularly positive (anybody
read "Tog on Interface"?). I see having access to the source code
through a class hierarchy browser as an enhancement to the
development environment, not an alternative to documentation.
For me, the thing is is that you don't necessarily want to see how,
for example, NSMutableDictionary's setObject:forKey: works, but how
it is used - and intended to be used.
Why are there so many tutorials on Cocoa? I contend that this is
because it is so black boxy that it is like groping around in a
darkened room!
But having access to the source is nothing without the ability to
easily examine the classes and their methods through something like a
'class hierarchy browser'. (However, usability is very important as
I, personally, found the browsers available for MacApp to be not very
useful.)
I commend anybody interested in this area to look at Smalltalk.
There are free Carbon and Cocoa implementations of Squeak (originally
developed by Apple), for example, available from
http://www.squeak.org. It is where Objective-C and Cocoa came from.
>
>
I should think a risk of learning from source is that
>
you may rely on things that you shouldn't, making it more
>
likely your code will break later. On the flipside, making
>
source code available might cause Apple to make fewer
>
changes to the framework, in order to avoid precisely that
>
problem, but slowing advancement of the platform and
>
allowing poor designs to become entrenched.
OTOH, opening up the source could make the Cocoa developers ensure
that the code is of a very high standard (of course, it already is,
isn't it, Apple?) - and, we get to help out the poor, pressed Cocoa
developers with bug reports and fixes!
>
The AppKit and Foundation are really pretty small, compared
>
to most other frameworks these days. Compared to Swing, there's
>
really not as much to learn.
Although size is an important factor, there is still the issue of
frequency of use and maintaining knowledge of the classes in memory
(maybe I have a memory like a sieve?). Whatever the size of the
framework/library, while there are classes that I might use every
day, there are others that I might not use in six or twelve months -
I might not even use a particular subset on a particular application.
What I don't use, I'll lose, so I then have the issue of how to best
expedite learning, re-learning, checking syntax and usage style.
Karl
--
----
Klaatu barada nikto