major noob question

Discussion in 'Mac Programming' started by swingerofbirch, May 2, 2006.

  1. swingerofbirch macrumors 68040

    Oct 24, 2003
    The Amalgamated States of Central North America
    So, I had an idea for an application I would like to make.

    The only programming I know is HTML. However, my classes are over, and I have the summer to do pretty much as I please, and I'd like to make an app for Mac OS X.

    So, OK, my first question is, when programming in Mac OS X, do you need to know a coding language? If so, what is the language?

    Second, do you use a coding language to write Cocoa apps, or is Cocoa itself the language? I get the sense that there are multiple ways to approach making a Cocoa app, do any of them involve WSIWYG programming?

    I can imagine these questions would annoy you guys who know a lot about this, but I'd appreciate you humoring all the same.
  2. Chaszmyr macrumors 601


    Aug 9, 2002
    Just like with PCs, there are many coding languages used to make Mac apps. The most common language used in Mac programming is Objective C. Cocoa is a project type, Cocoa apps are usually Objective C and/or Java.

    EDIT: and by the way, HTML doesn't count as programming, don't tell people you know how to program HTML or they will laugh at you lol
  3. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Agreed. HTML is a markup language (hence the ML) not a programming language. "HTML programmer" is such an oxymoron.
  4. swingerofbirch thread starter macrumors 68040

    Oct 24, 2003
    The Amalgamated States of Central North America
    So since I want to build an application, should I first learn Objective C or Cocoa?

    And how might I go about learning them?

  5. janey macrumors 603


    Dec 20, 2002
    sunny los angeles
    objective c, as it's the language. cocoa is an API.

    i'm on the kochan objc book right now, it's pretty good, check it out :)
  6. virus1 macrumors 65816


    Jun 24, 2004
    ya, both..

    i will sell you my books on them for $30 + shippin.

    this and this

    good condition as i remember. i never really got into it as much as i thought, but if you have a free summer, it might be worth it. the ability to program is invaluble.
  7. x704 macrumors regular


    Apr 15, 2006
    I would recommend not touching BASIC in general because you will pick up bad habits, just skip to an OOP language.
    As far as which language c++, objective c, java , ... I would say java to start with but then again I have not tried any other c hybrid languages. If you decide to go with java I will be able to help you somewhat and give you a couple of really good book isbns on java.

    No matter what you decide you will get good help here.
  8. dpaanlka macrumors 601


    Nov 16, 2004
    You should first learn what these terms mean.

    Enroll in a course at your local community college. I would say C++ would be a good all-around language to learn.
  9. janey macrumors 603


    Dec 20, 2002
    sunny los angeles
    I would imagine C would be better, only because objc is more similar to C than C++ or Java. (not counting OOP, just, in general)

    However, I find the Kochan book very thorough, like it would probably be possible for you to learn Objective-C as a first language if you wanted to try it.

    (And I dunno about you, but the CCs here tend to have these things called prerequisites...and BS classes like VB and intro to computers and _then_ C is generally the stuff you have to do before you can take C++/Java classes....if you're in HS, i suggest taking AP Computer Science...the current language for the exam is Java)
  10. swingerofbirch thread starter macrumors 68040

    Oct 24, 2003
    The Amalgamated States of Central North America
    Hi, Thanks everyone. I am going to look into seeing what my community college has.

    I did some casual searching on the net and came across a programming language called Ruby, and a site which has a very "hold-your-hand" tutorial in building very basic apps that I have just about finished up. It was helpful I believe. A bit discouraging in that it seems that language at least is all controlled by code.

    When I had the Developer Tools on my Mac (I took them off for space consideration a while ago), I dabbled with some of the included apps. And I remember in one I was just dragging windows and menu bars and in a "WYSIWYG" way creating something (probably not an app!). So, it makes me wonder. If Apple has these programs where you drag and drop UI is that related to coding languages? Is there such a thing as a development environment that uses no coding?

    Here's an analogy that illustrates my question:

    HTML: GoLive : Web Pages
    Code: ?????? : Applications

    Does such a ????????? exist?
  11. mrichmon macrumors 6502a

    Jun 17, 2003
    Ultimately the answer is no. There have been many, many attempts but research in the field over the past 30 years has not turned up anything practical for anything other than very constrained types of applications.

    The problem is that you need some way of specifying the behavior of the application and there really are no manageable visual approaches to specifying the application behavior.

    Some things you could look at include: Applescript, HyperCard (this is not supported by Apple on OS X, but I recall that a third party has a OS X HyperCard engine).
  12. therevolution macrumors 6502

    May 12, 2003
    The analogy is flawed. HTML is not the same thing as code. The "ML" in "HTML" stands for "markup language," (as dejo noted) meaning that it's just a way to specify how you want things laid out on a page. Application programming is far more open-ended, as you might imagine. As mrichmon said, a purely visual environment is generally not expressive enough for that task. It can work for very simple things - LEGO Mindstorms actually come with an application that lets you program them this way, for example.

    The program you saw (Interface Builder) allows you to rapidly create various elements of a UI, then leaves it up to you to specify their functionality through code. It's a time-saver for building the UI, but that's only one part of an application.
  13. janey macrumors 603


    Dec 20, 2002
    sunny los angeles
    Hey, Ruby is not a bad language to learn at all :) It's actually one of my favorites, it's beautiful and simple, and sites like Why's (Poignant) Guide to Ruby ( are sweet :D

    If you're interested in web development, you might want to consider it though. But a more apt analogy would be something like PHP/Ruby on Rails/etc. for web applications in the place of HTML and GoLive.

    No shortcuts though, I'm afraid :) Languages are generally not that hard to learn though, it's almost like writing in shortened English sometimes, seriously! But if you need more of a hand-holding book, there are some intro programming books that are like that. I got one about C# as a birthday gift (it was called programming in the key of C# or something) once, and although it's way too simple for my tastes, it does hold your hand the entire way and actually wasn't so bad. Had a cool program at the end that played some song in the key of C# too.
  14. savar macrumors 68000


    Jun 6, 2003
    District of Columbia
    0) HTML isn't programming...there's no flow of execution, no control structures, no variables, etc.

    1) Not necessarily. You can write "programs" in something like Automator. For real development, yes you need to know a programming language. Why would people still be learning them if they weren't necessary?

    2) Cocoa is an API and an environment (run-time) for applications; the language itself is Objective-C (or Java, but that's discouraged). Cocoa apps have a WYSIWYG tool for building interfaces, appropriately named Interface Builder. But that just helps you layout the interface. All the glue logic still has to be done in Objective-C.

    3) Unsolicited Advice: If you want to write real applications, get an introduction to programming book. Learn the basics with a language like C (or maybe Java). Once you've got that down, get the Hillegass book on Cocoa. This might take more than a summer to get it all digested.

Share This Page