Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dieseltwitch

macrumors regular
Original poster
Jan 24, 2008
142
0
As the title implies I'm just looking for the difference between the the two?
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
To expand slightly on caveman_uk's description:
Cocoa is an Objective-C API that is Apple's currently preferred method for writing applications for OS X. It allows the use of Interface Builder to build GUIs. It gets the "latest and greatest" updates from Apple as new OS updates are released.

Carbon is a C API that Apple still supports for writing applications on OS X, but it's original intent was to provide a bridge from the "Classic" (pre-OS X) Mac OS to OS X. While it has not been deprecated at this time, and it may not be soon, it is no longer being updated with the vigor that Cocoa is, and it will not, for example, be given full 64-bit support.

There are still a number of "big league" applications written in Carbon (a number of Adobe applications, for example), but it is recommended that if one were to be starting a new project targeting OS X, that Cocoa be used. There are arguments that using Carbon is easier when writing the Mac OS version of a cross-platform application, but I am not familiar with these.

-Lee
 

Sayer

macrumors 6502a
Jan 4, 2002
981
0
Austin, TX
Actually Cocoa is an application framework, not just an API.

The difference is that a lot of functionality is packaged into a framework and your code simply adds to or modifies existing framework behaviors. Managing documents, multiple windows, saving/reading preferences are some of the more mundane tasks that the frameworks handles for you, many times completely automatically in your app.

With Carbon you have to write a lot of the application functionality (not nearly as much as you used to do with Classic Mac OS).

A lot of what is now "Cocoa" is actually built on top of Carbon APIs, but wrapped up with lots of bells and whistle features and with the complexity almost completely hidden away from the programmer.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.