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

Kingsly

macrumors 68040
Original poster
I have been wanting to get into some minor developing for a while, but there are more languages out there than I care to count.

So, for a first-timer wanting to make some useful but not overly flashy or complicated apps, what programing language should I take the time to learn?

Java, Carbon, Cocoa, C, AppleScript... the list goes on and I don't even have a clue at to what I'm talking about. :eek:
 

FredClausen

macrumors regular
Aug 7, 2006
169
0
KALM
You've mixed up two different groups of terms.

First group is a programming language. Objective C, C, C++, Java are examples of a programming language.

An Application Framework (among other terms, you can call these different things) is what is used BY a programming language to accomplish its task. Thats generalized, but good enough for now. Cocoa and Carbon are Mac examples of this, Qt and GTK are linux examples, and MFC is a windows example.

If you look at the thread anchored at the top of this forum it describes two great books to help you learn Objective C* and Cocoa. There are also several GREAT websites in the thread.

* I am assuming you want to program only on the Mac, which is why I am assuming Objective C is what you should learn.
 

HiRez

macrumors 603
Jan 6, 2004
6,250
2,576
Western US
It's not an easy answer. Since you didn't mention you specifically wanted to do Macintosh programming, I would probably start with Java. I will tell you why I recommend Java to start:

1. It runs on just about any box out there, and the code is portable across platforms.

2. It has a good balance of built-in safeness (applet sandbox, no pointers or pointer arithmetic, automatic garbage collection) and power to be able to do some serious things with it as you grow in proficiency.

3. It has a built-in, cross-platform GUI package (JFC/Swing, JSF) for building interfaces. Some great languages such as Python still do not have this, you have to add them on with extra bundles and learn the API (which is often written is some other language).

4. There is a huge amount of free information available on the web about Java, including many, many tutorials, help boards, etc. When you're stuck on a problem at 3am this can be a big advantage. There are also hundreds of good Java books available.

5. There are a number of good development environments available, scaling all the way from a simple text editor plus a command-line terminal, to full-blown integrated enviroments with all the goodies such as NetBeans, Eclipse, etc. Most of these are free/open-source.

6. Java is based on C and at some point you'll probably want to learn C and C-derived languages such as C++ or Objective-C. Once you know Java, learning C is pretty easy (that's the path I originally took).
 

Kingsly

macrumors 68040
Original poster
FredClausen said:
You've mixed up two different groups of terms.

First group is a programming language. Objective C, C, C++, Java are examples of a programming language.

An Application Framework (among other terms, you can call these different things) is what is used BY a programming language to accomplish its task. Thats generalized, but good enough for now. Cocoa and Carbon are Mac examples of this, Qt and GTK are linux examples, and MFC is a windows example.

If you look at the thread anchored at the top of this forum it describes two great books to help you learn Objective C* and Cocoa. There are also several GREAT websites in the thread.

* I am assuming you want to program only on the Mac, which is why I am assuming Objective C is what you should learn.
Thanks for clearing that up. Like I said:
I don't even have a clue at to what I'm talking about. :eek:

HiRez said:
6. Java is based on C and at some point you'll probably want to learn C and C-derived languages such as C++ or Objective-C. Once you know Java, learning C is pretty easy (that's the path I originally took).
Thanks. Since it sounds like I will eventually want to end up at the Objective-C level then perhaps Java is the way to go. I was afraid if I learned one language that I would have to start all over again to move up to something else...
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
As long as you understand the concepts behind programming, learning a new language is easy. It's just the APIs (like Cocoa, Carbon, .NET, MFC, etc) that take the longest to master.
 

mduser63

macrumors 68040
Nov 9, 2004
3,042
31
Salt Lake City, UT
Kingsly said:
Since it sounds like I will eventually want to end up at the Objective-C level then perhaps Java is the way to go. I was afraid if I learned one language that I would have to start all over again to move up to something else...

If you really do want to learn Objective-C, then I recommend starting with Objective-C. Objective-C is not higher-level or harder than Java, it's just different. For Mac programming, Objective-C is definitely the preferred language. Besides that (IMO) it's a pretty good language for beginners, and you'll basically learn C in the process as well. I don't know Java, but I don't believe it's terribly hard to learn once you've mastered any normal object-oriented language. The concepts are mostly the same, there are just implementation details and specifics of the syntax that you have to learn.

Now, all that said, if you aren't looking to learn to develop specifically Mac applications, then Java may be the better way to go. Java applications are generally fully cross-platform, but they're definitely not first-class native feel apps on the Mac, as anyone who has used Azureus or any number of other Java apps can attest.
 

x704

macrumors regular
Apr 15, 2006
118
0
HiRez said:
It's not an easy answer. Since you didn't mention you specifically wanted to do Macintosh programming, I would probably start with Java. I will tell you why I recommend Java to start:

1. It runs on just about any box out there, and the code is portable across platforms.

2. It has a good balance of built-in safeness (applet sandbox, no pointers or pointer arithmetic, automatic garbage collection) and power to be able to do some serious things with it as you grow in proficiency.

3. It has a built-in, cross-platform GUI package (JFC/Swing, JSF) for building interfaces. Some great languages such as Python still do not have this, you have to add them on with extra bundles and learn the API (which is often written is some other language).

4. There is a huge amount of free information available on the web about Java, including many, many tutorials, help boards, etc. When you're stuck on a problem at 3am this can be a big advantage. There are also hundreds of good Java books available.

5. There are a number of good development environments available, scaling all the way from a simple text editor plus a command-line terminal, to full-blown integrated enviroments with all the goodies such as NetBeans, Eclipse, etc. Most of these are free/open-source.

6. Java is based on C and at some point you'll probably want to learn C and C-derived languages such as C++ or Objective-C. Once you know Java, learning C is pretty easy (that's the path I originally took).

That's the way I feel after BASIC and a couple others before java. Like this guy said in a nutshell Java is easier to learn then c/c++, it is OO (Object Oriented) from birth, it is more strictly typed (less coding/compiling problems) and because it was made with c programmers in mind you can pick up on c/c++ quite easy later if you want.

Also don't think you are limited to applets only. I personally don't like applets so I make my GUIs (Graphical User Interface) applications. As far as books go the one I use all the time is titled Beginning Java 2 by Ivor Horton, I have the one that covers JDK (Java Developers Kit) 1.2, you might 1.3 or 1.4 (1.4's ISBN is 0764543652). This book also covers Java applications as well was applets which I have noticed is somewhat rare.
 

caveman_uk

Guest
Feb 17, 2003
2,390
1
Hitchin, Herts, UK
You didn't say why you wanted to learn a language. If it's to program only on the mac then objective-C/Cocoa is the most supported way of doing it (also the tools are free). If you want to program on other platforms as well then I'd say Java then perhaps C++ as both are pretty applicable to any platform. Also in the job market there's a fair bit of demand for both of those (as well as the usual MS only languages)
 

Kingsly

macrumors 68040
Original poster
caveman_uk said:
You didn't say why you wanted to learn a language. If it's to program only on the mac then objective-C/Cocoa is the most supported way of doing it (also the tools are free). If you want to program on other platforms as well then I'd say Java then perhaps C++ as both are pretty applicable to any platform. Also in the job market there's a fair bit of demand for both of those (as well as the usual MS only languages)
Sorry, I suppose it would've been nice to mention that I want to develop for Mac.

I am getting a general feeling that Objective-C is the way to go then...

...any good, entertaining (i.e. not stupidly dry) books that do a good job teaching it?
 

Nutter

macrumors 6502
Mar 31, 2005
432
0
London, England
Kingsly said:
I am getting a general feeling that Objective-C is the way to go then...

I would say so. Apart from the fact that Objective-C is the dominant language in Mac programming, it is also an excellent language to start with because of its simple and elegant syntax.

I'd recommend Steve Cochran's book, "Programming in Objective-C". This book only covers command line applications, which is the very best way to learn a language if you're new to programming.

After that, you can read one of the many Cocoa books to get you started with the blinkenlights. :)
 

mduser63

macrumors 68040
Nov 9, 2004
3,042
31
Salt Lake City, UT
Kingsly said:
Now... what would one suggest for a good Cocoa book?

Cocoa Programming for Mac OS X by Aaron Hillegass (Second Edition). I got my copy at the local Barnes & Noble.

Go through Steve Kochan's book first though, because Hillegass assumes you already know C or Objective-C.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.