Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Cocoa or Carbon?

Cocoa or Carbon?
Thread Tools
Senior User
Join Date: Jun 2001
Location: Merry Land
Status: Offline
Reply With Quote
Nov 1, 2002, 11:11 PM
 
Okay all, I'm not trying to start a flame war here...I know people are very dedicated to their programming environment of choice, but...

I am a web programmer that would like to get a start in building apps for the Mac. Which would you recommend I learn? Carbon or Cocoa? Why? I know that each has its respective benefits and shortcomings, I would just like to see which language would suit me best.

Thanks!
     
Mac Elite
Join Date: Jul 2001
Location: Evansville, IN
Status: Offline
Reply With Quote
Nov 2, 2002, 12:05 AM
 
Cocoa and carbon are not languages. they are APIs. if you want to use Carbon, then you gotta learn C. if you want to use Cocoa, you gotta learn Objective C (which would mean basically learning C first anyway). if you are new to the whole programming thing other than web programming, pull your hair out learning Cocoa. its the real language

yes, I probably just started flamewar. bite me.
Justin Williams
Chicks Really Dig Me
AIM - iTikki [NEW AND IMPROVED!]
http://www.tikkirulz.com
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Nov 3, 2002, 04:42 PM
 
As Justin said, Carbon and Cocoa are not languages. However, the Cocoa APIs are mostly tied to a specific language--Objective-C.

I would recommend you learn Cocoa. Here's my short, general breakdown of the two APIs' benefits:

Cocoa
- Tied to Objective-C, which is both powerful and easy to understand. (I could go on for a while about how shiny Objective-C is, but that's a bit of a tangent, I suppose.)
- Has a large library of classes that do most of the rote work (even down to some picture manipulations) for you.
- Can integrate Carbon calls fairly easily if you need to.
- Inherently Object-Oriented.

Carbon
- Can be written in plain C or C++, which makes it more portable to other operating systems that don't have Objective-C compilers.
- If coded right, applications can be run on OS 9.
- Has access to some OS functions that Cocoa doesn't (e.g. using resource forks, making files invisible)--though Cocoa applications can call these functions.

Basically, Cocoa is much easier to use. Carbon is relatively difficult and huge. Cocoa applications aren't very portable, but I wouldn't recommend you start with Carbon.

One other little thing that gets me: The Cocoa documentation seems to be much better than Carbon's. Any amateur progrogrammer knows there's a difference between, say, a short and a short *, but somehow they manage to screw up the distinction on every other page I read.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Senior User
Join Date: Jun 2001
Location: Merry Land
Status: Offline
Reply With Quote
Nov 4, 2002, 09:49 AM
 
Thanks guys. I found another thread which recommended a great Cocoa book, so I made a trip to Borders to get that and a book on C.
So far so good.
     
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status: Offline
Reply With Quote
Nov 4, 2002, 12:00 PM
 
Originally posted by snerdini:
Thanks guys. I found another thread which recommended a great Cocoa book, so I made a trip to Borders to get that and a book on C.
So far so good.
I hope that Cocoa book was the Aaron Hillegass book! I'm going through that now - it's fantastic.
     
Senior User
Join Date: Jun 2001
Location: Merry Land
Status: Offline
Reply With Quote
Nov 4, 2002, 12:16 PM
 
Originally posted by hayesk:


I hope that Cocoa book was the Aaron Hillegass book! I'm going through that now - it's fantastic.
Yes, it most certainly is.
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Meida, PA USA
Status: Offline
Reply With Quote
Nov 5, 2002, 09:12 PM
 
Originally posted by snerdini:
Yes, it most certainly is.
Congradulations! I've been reading it and it's great stuff.

If you get stuck, questions some code, etc., check out the book's entry at:

http://www.techstra.net/

very useful extras as you work through the book. Best of luck!!
~ Mike
--
Personal Site: MikeZornek.com
Other Interests: WebDevWiki.com
     
Junior Member
Join Date: May 2002
Location: Australia
Status: Offline
Reply With Quote
Nov 6, 2002, 03:28 AM
 
Apple not only supplies developers the opportunity to develop in Obj-C or Carbon. With the advent of Java 1.4.1 on OSX. Java has core benefits that rival its competing environments.

- Fast and getting Faster - See JVM 1.4.1
- Cross Platform
- The fastest growing Developer community in the world 2+ million developers
- Huge IT and blue chip backers
- Not Limited to Apple as your sole provider
- Pure Objected Orientated
- Easy to learn
- Scalable, Network Centric
- The Language of the internet
- Lots of employment opportunities
- A great general purpose language covering the range from server side (J2EE) to clients side (J2SE) applications and phone , pda's (J2ME) .
- Backed by Apple, IBM, Sun, Nokia, Sony, etc.
- Realistic and only opposition to MS and .NET

Do yourself a favour and look into Java.
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Nov 6, 2002, 11:13 AM
 
Aside from the first point (which I hope was a joke), Dogwood makes some good points.

I still like Cocoa/ObjC better, but if you're the sort who's actually into reaching a broad audience, Java is a pretty nice choice.

Just felt like chiming in on the tangent.
(Last edited by Chuckit; Nov 6, 2002 at 11:42 AM. )
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:17 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2