Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nsutton

macrumors member
Original poster
Dec 29, 2009
92
0
6 Feet Under
I just started learning Objective C today and It will be my third programming language (Python,C#).

I'm kinda confused about the whole cocoa thing. I know it a apple api for objective C but what does it add to the core language?
Does it change the syntax at all or require extra learning to use it?
 
Objective-C is an extension to C that adds its own syntax for dealing with objects.

When programming on the Mac or iPhone platform there are quite a few "bonus" classes that you have access too, such as collection classes and strings/parsing.

Cocoa in the strictest sense is the graphical frameworks for laying out windows, buttons, text views, et'cetera...

The syntax is the same, but there are some paradigms to learn and love. Model-View-Controller being the biggest.
 
Cocoa in the strictest sense is the graphical frameworks for laying out windows, buttons, text views, et'cetera...

This is incorrect. Cocoa includes not only App kit (which is what you're describing above) but also the Foundation Framework which includes all of the non-graphical classes (NSObject, NSString, NSArray etc.). I hate to split hairs, but you did say "strictest sense," so I'm being persnickety.

Here's a link to the relevant documentation.
 
This is incorrect. Cocoa includes not only App kit (which is what you're describing above) but also the Foundation Framework which includes all of the non-graphical classes (NSObject, NSString, NSArray etc.). I hate to split hairs, but you did say "strictest sense," so I'm being persnickety.

Here's a link to the relevant documentation.

You are correct. I guess Apple muddied the water when the iOS's version of Cocoa is called Cocoa Touch although the vast majority of the underlying Foundation level frameworks are the same or at least very similar, but the hither level frameworks for things like buttons or table views are completely different. I guess because of that I've always considered Cocoa as being the graphical frameworks.

In a lot of ways then, practically anything you use in Objective-C is Cocoa. Though Objective-C is available on other platforms, you don't get any of the useful classes.
 
In a lot of ways then, practically anything you use in Objective-C is Cocoa. Though Objective-C is available on other platforms, you don't get any of the useful classes.

The GNU project has implemented many of those useful classes in the open-source and portable GNUStep.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.