Cocoa vs. Carbon???


Chances are that this has already been asked and answered, but here it is anyway.

For a pretty new programmer (me), who has experience with REALbasic and Microsoft (ahck) VC++, which is better to start programming in? Carbon or Cocoa.

I know that the limitations of Cocoa is that is only for OSX, but for right now, I am only planning on developing programs for OSX. Later on, I would like to try and port the programs to Windows, but that is not important right now.

I have found that there is far more documentation for Cocoa than there is for Carbon (at least with Project Builder). There also seems to be a number of independant websites dedicated to Cocoa and newbie tutorials.

Any suggestions or thoughts?


cocoa love
<p>Yes, my name is Roger, how ya doin. Well Carbon and Cocoa are very different and the best way to answer your question would be to say "whatever best fits your needs."</p> Cocoa is RAD (rapid application development) and if you want a fast way to develop apps, use Cocoa. The terminology is kept to a minimum, and there's alot to learn. But once you learn it, it's soo worth it. Carbon would take a little longer. I'm not too experienced with Carbon, but I've seen some source files and boks on it, and I don't understand it one bit.<p>I dont mean to sound rude or anything. But I would call Cocoa anything but limited. Carbon apps, can take up to a few months to build. Cocoa apps can take a day to build. Cocoa apps can also be Internationaled to the whole World to use. Cocoa can be written in Java as well, which in fact, is for many many platforms out there. Cocoa has evolved since 1987, being perfected year after year. Much like "ancient programming" how you use to have to build everything from scratch - evolution later carried on to factories. A much better, faster, way to build the things they need.</p><p>There are already 300,000 users using Mac OS X and the number will only keep getting bigger and bigger. Well i hoped i helped you out a little bit. Good luck.</p>


Let me redefine my question a little.

What is the future of Carbon? As I understand, it was designed to be a step inbetween Classic APIs and Cocoa APIs? This this a correct understanding?

If so, this would lead me to believe that if you are developing programs for the Mac OSX, but are not concerned with Classic, that Cocoa is the best choice. However if you want to write apps that would be both Classic and OSX, then you would write them in Carbon (or rewrite them in Classic).

Here is a separate related question:

Everyone is talking about how Cocoa is cross-platform compatible because you can write the code in Java. Is this true? If I were to write the software in Java, how easy would it be to port the software to windows? I know this is a vague question, but let's say that the app is a recreation of Pacmac. Simple 2D graphics (or OpenGL if you wanted), and a high score list...

And here is a response to whitesaint:

I was reading your posts in another thread about school and your mom. I thought the part about your sister and cotton candy was hilarous. Let me offer a slight slant to the advise you have already heard.

I have been a Graphic Designer for 10+ years starting at my first job right out of high school. Having a great deal of experience in a field can be a problem when you go to college... for example, I knew more about the ins-and-outs of graphic design than most of the Graphic Design seniors at the school because I was working in real world situations. (Graphic Design was not my major, Music was...) However, I never took graphic design classes, and now am suffering from a lack of General Education in layout and design -- Core Foundation classes that all of the students were learning when I thought I knew it all.

My Advise: 1) When you do get to college, do not grudge "easy" classes -- they teach you more than you think about WHY. 2) Since you are still a junior in HS, and are out for the summer, write as many shareware programs (or whatever you like), and start earning money. It never hurts to have money going through college. It is definitely better than being a poor-starving-student!


Not a Moderator
Knighthawk: You are correct, carbon is for those who want to maintain compatibility with Classic. If you have intention of developing for classic, then Cocoa would be your best bet.

As far as writing cross-platform apps in Java, anything you write with the Cocoa API will not be cross-platform compatible, ie the GUI. Your basic objects could be written with no platform specific API calls and therefore would be available to any platform with a Java compiler.

Hope that answers your question.


Dis Member
What is the future of Carbon? As I understand, it was designed to be a step inbetween Classic APIs and Cocoa APIs? This this a correct understanding
Carbon isn't going anywhere for quite awhile. Think of all the Classic apps that are going to be ported to X as Carbon apps - Photoshop, Quark, InDesign, Illustrator, Office, Freehand.. basically every app people used on OS9. The only Classic app I can think of that's being rewritten for Cocoa is Nisus Writer.

It would be more accurate to think of Cocoa and Carbon as peers, accessing the same system resources. They're not there yet, but that's what Apple is heading towards.