Before we get to the difference between Carbon and Cocoa, we should first talk about one of the main differences between applications for OS 9, and applications for OS X.
An executable file, or the part of the application that "runs" is created in a certain format that's designed to work with the underlying operating system.
You could think of the format of executables in the same way that you might think about image file formats, or different languages.
OS 9's "native" executable format is called Code Fragment Manager (CFM) format, while OS X's native executable format is called Mach-O. Just think of it like the difference between a TIFF and a PSD, or the difference between English and Spanish.
CFM (OS 9) applications run natively in OS 9. If you're referring to these applications from within OS X, you'd call them "Classic applications" since they'd run in the Classic Environment. Using our language analogy, these would be applications that cover the entire range of the English language.
Well, Apple made it possible that certain applications that are CFM (English) could run natively in OS X as well as natively in OS 9. Any applications that use old deprecated English sayings such including words like "Ye", "Thou", and other older Middle English sayings are unfortunate, in that they cannot run in OS X, but must run in the Classic Environment.
So, we have CFM, and the special CFM which is called Carbonized CFM. CFM runs in OS 9 only, while Carbonized CFM can run in either OS 9 or OS X, or both. (The way they run in OS X is that they're provided with a friendly English-to-Spanish translator that they use on the fly while they're running).
Okay, enough about CFM, we now move onto the OS X native format which is Mach-O. Certain Carbon applications can use the Mach-O format rather than the CFM format. For example, the Finder is a Carbon application that uses Mach-O. (Anything nowadays by Apple will be Mach-O). A few others are iTunes and QuickTime Player. These applications can only run in OS X.
Cocoa applications are always Mach-O format applications, meaning they can only run in OS X as well. Cocoa is pretty cool -- much easier for me to have learned than the Carbon stuff. Unfortunately, you'll often need to use Carbon stuff in your Cocoa app because what you want to do is only doable in Carbon.
Anyway, I'm sure at this point your eyes are glazing over and you're thoroughly confused, so this little diagram, if it comes out formatted correctly, might make more sense:
|```Classic```|```Carbon````|```Cocoa````|
--------------------------------------
|
______CFM__________|___________Mach-O_____|
Hope this helps....
Dual 2.7 GHz PowerPC G5 w/ 2.5 GB RAM Mac OS X (10.4.6)