User Name
Password
AppleNova Forums » Programmer's Nook »

Cocoa vs. Carbon


Register Members List Calendar Search FAQ Posting Guidelines
Cocoa vs. Carbon
Thread Tools
azcoder
Member
 
Join Date: Oct 2005
 
2006-01-13, 19:13

I am a newbie mac owner.....and don't know cocoa or carbon.

I am starting to port some of my c++/SDL/OpenGL game demos to the mac.

I found an SDL framework and example in cocoa and have started learning Objective-C.

The I read that most cross-platform apps (like iTunes) use Carbon while many mac-only apps use cocoa.

Question: If I plan on leaving the bulk of my app in C++, should I still learn/use cocoa or carbon for the base app framework? ( I would like to keep as much of my application cross-platform as possible)

Thanks for any feedback....
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2006-01-13, 21:42

Quote:
Originally Posted by azcoder
Question: If I plan on leaving the bulk of my app in C++, should I still learn/use cocoa or carbon for the base app framework? ( I would like to keep as much of my application cross-platform as possible)
There's two options in that scenario. Most larger vendors pick the "easy" one, i.e. Carbon (which is primarily C++). However, there's another one that Apple, at least, prefers: use Cocoa, but for bridging, use Objective-C++.
  quote
Enki
Senior Member
 
Join Date: Nov 2004
 
2006-01-13, 23:50

If you know C++, you are about 95% of the way to understanding Obj-C. It's mainly just getting used to [foo barWithArgs:1 arg2:2] instead of foo->bar(1, 2)
  quote
Kickaha
Veteran Member
 
Join Date: May 2004
 
2006-01-14, 01:09

I'd suggest Cocoa for the Mac-only bits. In my experience, it's just a better thought out framework that makes complex apps and GUIs a no-brainer. Since you're planning on already having a clean separation between cross-platform and Mac-only code, and since Obj-C++ is there for precisely this sort of situation, I'd say it's your best bet.

Learning Obj-C is trivial compared to learning how to get Carbon to behave properly for complex tasks, IMO.
  quote
azcoder
Member
 
Join Date: Oct 2005
 
2006-01-14, 08:16

Thanks for the tips- I will continue my Objective-C learning and use Cocoa for the Mac-only stuff.......
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools

« Previous Thread | Next Thread »

All times are GMT -5. The time now is 04:00.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova