What is Carbon?
Marcel Weiher
marcel at metaobject.com
Sat Feb 5 08:57:58 UTC 2000
> From: "Andrew C. Greenberg" <werdna at gate.net>
> MacOS X has a compatibility mode for running "traditional" MacOS 9
> and earlier applications. Certain API and library calls were
> modified, and some eliminated, so to permit coding consistent with
> the Mach kernel. This compatibility mode for awhile was code-named
> "carbon." See, e.g.,
>
> http://developer.apple.com/macosx/carbon/
I know it's hard to keep track of Apple's strategy, but for
completeness' sake, I'd like to add that there are actually 2 MacOS
compatibiliy environments in MacOS-X.
One is for users, called 'Classic', the other is for developers and
called 'Carbon'.
The 'Classic' environment is an extension of the BlueBox environment
now available on MacOS-X-Server. It consists of a copy of an
earlier MacOS (mine currently runs 8.x) running as a single task
within OS-X. This environment is binary compatible with current
MacOS, but shares its limitations. It's a little like running
SoftWindows or SoftPC except that the processor need not be emulated.
For example, I can run Squeak Central's MacOS release alongside
Quark and Photoshop etc. right now on OS-X-Server. However, if any
of these applications crashes, it usually takes the rest of the
Classic environment, including other Classic apps, with it, just like
a real MacOS. All this happens within the single Classic task that
runs on OS-X, so OS-X itself or other OS-X tasks are not affected.
'Carbon' on the other hand is an actual re-implementation of the
Toolbox for OS-X, created in order to allow Toolbox based programs to
become fully native on OS-X. As such, it requires re-compilation of
Apps and also some adaptation to take into account calls that have
been removed...
> There was a program called a "carbon dater," which read a code
> resource, abd checked the API set for compatibility. See, e.g.,
>
> http://developer.apple.com/macosx/carbon/dater.html
>
...and as Andrew pointed out, there are utilities to help you see
how much you will have to change. Once you make those changes, your
app will be able to run fully native on OS-X, as well as still being
able to run on older MacOS versions (I think even as a binary) as
long as that version has the CarbonLib installed. I have to admit
that I don't know how far back you can install CarbonLib.
However, given my biases, I have to note that, now that all the
major software developers have backed OS-X, Apple has begun stating
the obvious once again: that Carbon is a transitional API and that
new development should use Cocoa, the object-oriented API inherited
from NeXTStep/OpenStep.
Executive summary:
- 2 MacOS compatibility methods for MacOS-X
- Classic is a binary-compatible, user-level environment similar to
SoftPC or SoftWindows
- Carbon allows developers to recompile their Toolbox apps to become
fully native on OS-X
- Cocoa should be used for new development, offers more power,
greater features
Marcel
More information about the Squeak-dev
mailing list
|