Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 6 of 6
  1. #1
    Brand0n is offline Registered User
    Join Date
    Mar 2011
    Posts
    5
    Thanks
    0
    Thanked 1 Time in 1 Post

    C++(CPP) Vs. Cocoa

    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.

  2. #2
    Mikuro's Avatar
    Mikuro is offline Crotchety UI Nitpicker
    Join Date
    Mar 2005
    Posts
    2,832
    Thanks
    8
    Thanked 74 Times in 64 Posts
    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.
    Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.8
    MacBook Pro — 2.26GHz C2D, 8GB RAM — OS 10.6.8

    Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc

  3. #3
    Brand0n is offline Registered User
    Join Date
    Mar 2011
    Posts
    5
    Thanks
    0
    Thanked 1 Time in 1 Post
    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++?

  4. #4
    szymczyk is offline Registered User
    Join Date
    Sep 2005
    Posts
    50
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.
    Mark Szymczyk
    Author, Xcode Tools Sensei
    http://www.meandmark.com

  5. #5
    icemanjc's Avatar
    icemanjc is offline I'm cool, I have a mac.
    Join Date
    Jan 2007
    Location
    Grand Rapids, MI
    Posts
    1,350
    Thanks
    3
    Thanked 58 Times in 56 Posts
    Quote Originally Posted by Brand0n View Post
    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!

  6. #6
    Cthutu is offline Registered User
    Join Date
    Feb 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cocoa can be used for games.

    Quote Originally Posted by szymczyk View Post
    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.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •