C++(CPP) Vs. Cocoa

Status
Not open for further replies.

Brand0n

Registered
can anybody help me? im curious on whether i should start learning Cocoa or C++ first, im going to use Xcode and if all else fails im planning on learning pything... Im 16 and i have always been in love with Game Lvl Design but recently ive been looking at jobs and they want people fluent in CPP (C++) and i also really want to try my hand at making apps for the ipod touch. (not planning on ever selling anything but i think it would be interesting and a good challenge). i guess in the end im not sure which to learn first, C++ or CoCoa because i hear Objective-c is not good enough although its pretty-much Cocoa so idk what to do. also do you know any free-sites to learn Cocoa? i have been studying learncpp.com to learn for free but im not sure if i should continue.
Oh yeah, on a side note im also learning Linux as well, i haven't really started yet but im prepared to.
 

Mikuro

Crotchety UI Nitpicker
C++ and Objective-C are languages; Cocoa is an API. If you want to make desktop apps, you will need an API like Cocoa no matter what language you use. Some more C++-friendly APIs are WxWidgets and Qt. But they are not as Mac-like as Cocoa.

There are also Cocoa bridges for a a variety of languages besides Objective-C, including Python. Personally I've never made a Cocoa app in any other language so can't comment much on that.

C++ Objective-C can be used in the same programs -- even in the same classes and files (rename your .m files .mm). If you're just beginning, though, this might create a lot of confusion. For example, you can't treat C++ objects the same way as Objective-C objects, so passing data around can be pain in the butt.

If you're interested in making cross-platform apps, using Qt or WxWidgets along with C++ or Python would be good choices. Cocoa is basically limited to Apple's world (there are related APIs like GNUStep for Objective-C on Linux, but they're not really cross-compatible anymore).

Or maybe you don't even care about making desktop/GUI apps, in which case Cocoa is not for you.
 

Brand0n

Registered
Well, it sounds like cocoa isnt all that useful! i thought it was a "special" language that was developed for ipod/iphone and stuff... at the most i "might" make a desktop app that calculates GPA for highschool students (well student haha just me) but only so that i have that sense of acomplishment that I did somthing that I made it, but i guess now it comes down to C++. Thank you! is there a specific way that you recommend learning C++?
 

szymczyk

Registered
Cocoa is a framework for building Mac applications. Cocoa Touch is a framework for making iPhone applications. Cocoa and Cocoa Touch have similarities, but are not identical.

If you want to make iPhone applications, learn Objective-C and Cocoa Touch. Learning C++ isn't going to help you make an iPhone app. If you want to make games, learning a programming language is a better way to start. Cocoa and Cocoa Touch won't help you write a game.
 

icemanjc

I'm cool, I have a mac.
Well, it sounds like cocoa isnt all that useful! i thought it was a "special" language that was developed for ipod/iphone and stuff... at the most i "might" make a desktop app that calculates GPA for highschool students (well student haha just me) but only so that i have that sense of acomplishment that I did somthing that I made it, but i guess now it comes down to C++. Thank you! is there a specific way that you recommend learning C++?
The best way of learning C++ would be from another person who understands it well, but unfortunately most people aren't willing to sit down and teach someone else for free.

I took a college course on C and the book we used did a very good job of explaining how things work and when you want to use them, sometimes even better than what the professor could explain. Thus I would recommend getting a book for teaching you C++. Even though there might be a plethora of sites that advertise that they can teach you C++, I think books on C++ are much more thought out and have better examples.

We used this for learning C, but since you want to learn C++ I would recommend this.


If you find out that you have no practical use for C++ after learning it, it will still help you to understand a lot more about how things work in day to day life with computers. All I have to say is good luck, and don't give up when it gets tough!
 

Cthutu

Registered
Cocoa is a framework for building Mac applications. Cocoa Touch is a framework for making iPhone applications. Cocoa and Cocoa Touch have similarities, but are not identical.

If you want to make iPhone applications, learn Objective-C and Cocoa Touch. Learning C++ isn't going to help you make an iPhone app. If you want to make games, learning a programming language is a better way to start. Cocoa and Cocoa Touch won't help you write a game.
Sorry I would have to disagree with you there. Cocoa Touch, Core Animation and Views are good enough to do simple sprite-based games. The performance is good enough. So even by learning Objective-C and Cocoa (which is a great journey btw), you can still write games. I've done it myself. In fact, some of the games I wrote using OpenGL could have, in retrospect, been written using just Cocoa.
 

magaretz

Registered
C++ and Objective-C are languages; Cocoa is an API. If you want to make desktop apps, you will need an API like Cocoa no matter what language you use. Some more C++-friendly APIs are WxWidgets and Qt. But they are not as Mac-like as Cocoa.
For develop cross-platform GUI programs, which API do you recommend? C#, QT, WxWidget, or something else?
 

Mikuro

Crotchety UI Nitpicker
That's something I've been struggling with. I love Xojo, but I can understand why people would prefer a free/open-source toolchain. Xojo is closed-source and proprietary (and somewhat expensive). But it's awesome.

These days I do a lot of work in Python, and I haven't found a GUI framework I really like yet.

C# is not a good bet for cross-platform work. It's really a Windows thing, even if there are other implementations (like Mono). I think Qt and WxWidgets are still the real choices for native-feeling cross-platform apps, at least in the open-source world. Kivy seems nice, but is geared toward mobile and is not remotely native-feeling.
 

kimzupi

Registered
Learn c++ first. Cocoa is library platform for Mac and iOS.
 
Status
Not open for further replies.
Top