Advertisement

Mac osx advice needed!

Started by February 15, 2005 03:29 PM
2 comments, last by phatdom 19 years, 9 months ago
Hi all, I've been on a 'programming break' for a while now, and I'd like to start again. However, in the past I used Windows with C++ (and DirectX 7.0). In the meantime I've switched to a Mac, which has OSX 10.2 and Project Builder. I'd like to learn Cocoa, and eventually OpenGL. What I'm asking is some advice really. I'm good at C and C++, and know a little Java (from what I've seen it's very similar so I should be able to pick it up). But all the tutorials I've found so far have been for people using Objective C, which I must admit I don't like the look of. I would be willing to learn it if I absolutely had to, but I don't know if it's worth the effort. I know it's a superset of C, but the syntax is so alien to my way of thinking it's a bit of a problem. So, with all this in mind, I'd like to ask your advice on the following: 1. Is it worth learning Objective C? If so, are there any good tutorials I should start with (I'm not incapable of Googling, but I'd value recommendations more). 2. If it's not worth the effort, are there any good tutorials for using Java and Cocoa in Project Builder - I'm talking really basic get me off the ground stuff? 3. Are there any good tutorials for learning the IDE generally, and things like NIB files and so on? As you can probably tell, I'm in need of some helpful pointers. Every search I conduct throws pages of stuff up for XCode, not project builder, and assumes I know at least some Objective C (which I don't)! I would appreciate any help / advice. Thanks, DT
Quote: Original post by phatdom
1. Is it worth learning Objective C? If so, are there any good tutorials I should start with (I'm not incapable of Googling, but I'd value recommendations more).


I feel that it is. I personally like Obj-C a whole lot more than C++, and if you already know C/C++ then it doesn't take long at all to learn the language syntax. A day or two at the most. Still, Obj-C isn't necessary for programming in OSX. There's the Carbon APIs which use C/C++, the Cocoa APIs which use Obj-C, or you can hack in C++ or Java which *is not* recommended, or you could just use Java and the Java runtime. Or you could forgo the APIs completely and just make a command-line app. Still, my recommendation is Cocoa with Obj-C as Carbon really shouldn't be used for new apps or anyone new to the Mac environment.

As for tutorials and resources... The first site is Apple's developer site (developer.apple.com) There's a Getting Started with Apple page, which leads to Getting Started with Cocoa. Apple also has a Objective-C language guide.

Cocoadev.com is the best web-site I've found. It's a wiki for Cocoa/Obj-C/etc. Stepwise is worth a look. There's also Cocoa Dev Central and Mac Dev Center.

The best book to learn from is Cocoa Programming for Mac OS X. That is *the* book for Cocoa and Obj-C. The Objective-C Pocket Reference and Cocoa in a Nutshell are also quite good.

Quote: 2. If it's not worth the effort, are there any good tutorials for using Java and Cocoa in Project Builder - I'm talking really basic get me off the ground stuff?


Java isn't usually recommended for use in Cocoa. I also don't know Java so I can't really give any help there, though Cocoa Programming for Mac OS X does include a chapter on using Java with Cocoa.

Quote: 3. Are there any good tutorials for learning the IDE generally, and things like NIB files and so on?


http://www.cocoadev.com/index.pl?HowToProgramInOSX
http://www.cocoadev.com/index.pl?ProjectBuilder
Apple's Interface Builder page
Alas, Apple has gotten rid of most of their Project Builder info, but maybethe X-Code page will be of some use.
Again, Cocoa Programming for Mac OS X is the best book you'll find and really covers all the basic stuff like nib files, starting projects in Project Builder, etc. Try to get the first edition, as it's still quite good, and it covers Project Builder. I believe the second edition has been updated for X-Code.
Advertisement
If you are going to do a lot of porting, I personally wouldn't bother with Obj-C... However, if you are going to be making a lot of Mac os x specific programs, pick up obj-c. It's the language that truly makes your applications native to OSX.

I might also suggest upgrading your OS to 10.3, or 10.4 when it comes out (should be soon). I like Xcode 10000x more than PB.

The best way to learn the IDE is to just tinker around with it for extended amounts of time. It's what I did, and sure it may not be the most efficient way of learning, but it IS do-able :)
It''s easy to be wise. Think of something foolish to say, then don''t say it.
Thanks to both of you - certainly plenty to think about!

I guess I'll give Obj C a try then - hope I can get my head round that horrid syntax! I'll definitely check out all the sites - thanks very much for all that.

I know where to come now for osx advice!

By the way, I'd love to upgrade to 10.3 (or indeed 4 when it's out), but finances are tight and I think trying to persuade the other half to let me spend money on it is unlikely to happen. Blood and stone are two words which spring to mind!

Might be able to get that book though....!

This topic is closed to new replies.

Advertisement