Women in Technology

Hear us Roar



Article:
  Cocoa Vs. Carbon?
Subject:   There is no master plan
Date:   2001-05-28 01:26:24
From:   laird
I'd like to point out a bit of an erronious assumption in this article. The two API's were never designed to have anything to do with each other. The reason that it's difficult for engineers to figure out the relationship between the two is that there isn't one. Yes, there are a few cases where Cocoa uses underlying Carbon services; this is a natural outgrowth of the fact that Cocoa runs across many operating systems (e.g. Windows), where it uses the native services, so when you run an OPENSTEP app on Windows, it'll use Windows print dialogs, etc.


But back to the main point -- the two API's aren't layered, and there is no master plan fitting them together. Cocoa provides all of the high-level and low-level functions that Carbon does, and more, just in a object-oriented, portable manner while Carbon is procedural and non-portable. They're just two completely different programming models, driven purely by the fact that many companies and developers would rather maintain an existing code base than face a rewrite. So if you've got tons of legacy code, or hate learning, stick to Carbon.



Cocoa is how a tiny company has produced a better web browser than a huge team at MS -- Cocoa apps are easily 10x easier to write than Carbon. I predict that Cocoa developers will out-perform Carbon developers, and that aside from a few markets where there's no real competition (i.e. people will always buy Windows, Photoshop, etc., no matter what any other company does), Cocoa-based products will beat Carbon in the marketplace, since the company will spend less money, produce higher quality software, and be more responsive to users' needs.


So, as many companies have proven, you have to compete with your own products (i.e. use Cocoa) or your competition will do it for you.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • James Duncan Davidson photo There is no master plan
    2001-05-30 14:51:44  James Duncan Davidson | O'Reilly AuthorO'Reilly Blogger [View]

    Of course at the beginning of the Rhapsody project, the two APIs had nothing to do with each other. But I have to point out that Cocoa is no longer the cross platform OPENSTEP. It came from OPENSTEP, but has changed along the way. There is no way to take a Cocoa app (in contrast to an OPENSTEP app) and compile it to work on Windows or wherever else. And, in my opinion, if you want truely cross platform code, go for Java.

    Now, as to the benefits of OO vs. Proceedural -- I'm a huge propoent of OO. I have been writing nothing but OO apps for the last 6 years or so and wouldn't go back to writing proceedural apps. Theres no question that Cocoa has an advantage over Carbon -- a huge advantage. But, every good OO programmer should know what is underneath the system that they are using. And know that it is not an either-or decision. In fact, to me one of the real strengths of Cocoa is being able to drop down to Carbon if needed. Or all the way down to BSD.