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

swingerofbirch

macrumors 68040
Original poster
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.
 

Chaszmyr

macrumors 601
Aug 9, 2002
4,267
86
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
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
Chaszmyr said:
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

Agreed. HTML is a markup language (hence the ML) not a programming language. "HTML programmer" is such an oxymoron.
 

janey

macrumors 603
Dec 20, 2002
5,316
0
sunny los angeles
swingerofbirch said:
So since I want to build an application, should I first learn Objective C or Cocoa?

And how might I go about learning them?

Thx!
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 :)
 

virus1

macrumors 65816
Jun 24, 2004
1,191
0
LOST
swingerofbirch said:
So since I want to build an application, should I first learn Objective C or Cocoa?

And how might I go about learning them?

Thx!
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.
 

x704

macrumors regular
Apr 15, 2006
118
0
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.
 

dpaanlka

macrumors 601
Nov 16, 2004
4,869
34
Illinois
swingerofbirch said:
So since I want to build an application, should I first learn Objective C or Cocoa?

You should first learn what these terms mean.

swingerofbirch said:
And how might I go about learning them?

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

janey

macrumors 603
Dec 20, 2002
5,316
0
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)
 

swingerofbirch

macrumors 68040
Original poster
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 elements...how 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?
 

mrichmon

macrumors 6502a
Jun 17, 2003
873
3
swingerofbirch said:
Is there such a thing as a development environment that uses no coding?

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).
 

therevolution

macrumors 6502
May 12, 2003
468
0
swingerofbirch said:
Here's an analogy that illustrates my question:

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

Does such a ????????? exist?
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.

swingerofbirch said:
And I remember in one I was just dragging windows and menu bars and in a "WYSIWYG" way creating something (probably not an app!).
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.
 

janey

macrumors 603
Dec 20, 2002
5,316
0
sunny los angeles
swingerofbirch said:
Hi, Thanks everyone. I am going to look into seeing what my community college has...
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 (http://poignantguide.net/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.
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
swingerofbirch said:
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.

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.