3. What is Carbon :
• Carbon is one of Apple Inc.'s C-based application
programming interfaces (APIs) for the Macintosh
operating system.
• Carbon provides a good degree of backward
compatibility for programs that ran on the now-obsolete
Mac OS 8 and 9.
• Developers could use the Carbon APIs to port their
"classic" Mac software to the Mac OS X platform with
far less effort than a port to the entirely different Cocoa
system which originated in OpenStep.
4. What is Cocoa :
• Cocoa is Apple's native object-oriented application
programming interface (API) for the OS X operating
system.
• For iOS, there is a similar API called Cocoa Touch
which includes gesture recognition, animation, and a
different user interface library, and is for applications
for the iOS operating system, used on Apple devices
such as the iPhone, the iPod Touch, and the iPad.
7. Managing Core Foundation Objects
• Use similar memory allocation conventions
▫ Allocate , retain, release objects
• NSObject Class – reference counting schema for
memory managemnet
• Newelly allocate object
▫
▫
▫
▫
Created with alloc & copy – with retain count 1
Retain message – increment by one
Release message – decrement by one
Reaches zero – deallocated by a procedure
8. Main Difference of carbon & cocoa
• Cocoa has an Objective-C API, and can be accessed
from C and C++ code easily. Carbon is a pure-C API.
• Carbon had pre-Mac OS X applications. Cocoa has
evolved from the Next-Step framework that Apple
acquired and used as the basis to create Mac OS X.
It's the "native" API for Mac OS X and the only way
to access some of the newest capabilities.
9. Continue….
• One way to check if an application is carbon or not is
to open the package contents of the application ,if
inside the 'Contents' folder of the package there is a
folder called 'MacOSClassic' and one called 'MacOS',
then it is a Carbon application.
10. Conclusion
Through this discussion, got some information
related with Cocoa Framework over the Carbon
Framework which extends the functionality and
give the rich features.