Help - Search - Members - Calendar
Full Version: Developing for the Mac?
Neowin Forums > Macintosh Customization & Support > Mac Software Discussion & Help
FriedApple
I would really like to start programing and would like to do so on the Mac. What languages do I need to know? Are there any good starter books (like dummies)?

Thank you
Mark
nuggetman
Objective C

there's a book that's called like Cooking with Cocoa or something like that that's supposed to be relaly good
FriedApple
Great, thanks!

What about C++? Is that used in OS X?

Mark
Bling3k12
Best place to start would probably be the ADC, Apple Developer Connection. The Getting Started section is nifty also.
Elliott
QUOTE(FriedApple @ Apr 20 2005, 14:42)
Great, thanks!

What about C++?  Is that used in OS X?

Mark
[right][snapback]585803534[/snapback][/right]

C++ can be used, but it's not nearly as native as Objective-C is to OS X. If I remember correctly, C++ will produce Carbon apps whereas Objective-C will produce Cocoa apps, even thought both can use Cocoa (e.g. Finder).
Wickedkitten
http://www.macdevcenter.com/
FriedApple
So it doesn't really matter if you use Cocoa or Carbon? I read a while ago that Cocoa apps were slow and unstable. I haven't seen anything like that with cocoa apps I use but just a question.

Thanks
Mark
roadwarrior
QUOTE(FriedApple @ Apr 21 2005, 08:50)
So it doesn't really matter if you use Cocoa or Carbon?  I read a while ago that Cocoa apps were slow and unstable.  I haven't seen anything like that with cocoa apps I use but just a question.

Thanks
Mark
[right][snapback]585807595[/snapback][/right]


Cocoa apps are the native type for OS X, so I don't understand why someone would say that (perhaps it was an old article you read?). Carbon apps can run on either OS 9 or OS X.
FriedApple
Thank you very much. This has helped me pick my path of learning.

Mark
Fred Derf
For $500, you'll receive all the benefits of ADC Select Membership and the Tiger Early Start Kit:
http://developer.apple.com/macosx/tiger/tigerkit.html?ht

ADC = Apple Developer Connection
FriedApple
Is this the equivalent of Microsofts MSDN?

Thanks
Mark
Fusion
QUOTE(FriedApple @ Apr 21 2005, 08:41)
Is this the equivalent of Microsofts MSDN?

Thanks
Mark
[right][snapback]585808299[/snapback][/right]


Yeah, sort of.

I'd really recommend cocoa, as it is OS X native. You really receive so many benefits by using it, it would be silly not to go for it.
evn.
To say that Carbon isn't "OS X native" is a bit of a misleading unless these people are trying to say that programs like Finder are not "native". In some places Cocoa is falling back on Carbon calls (ie: Menus) so if Carbon application's aren't native, neither are ones written using Cocoa. They are different but one is not inferior to the other in and of itself. Much like operating systems the value of each is best determined by what you're trying to do. If you need a very dynamic GUI application fast then you'll probably want Cocoa, if you're concerned with speed and backward compatability with OS 9 users then you'll want Carbon. There's an article on O'reilly's Mac Developer Center about this so I won't bother making those same points. Carbon is not dead, it's not 'bad', and it's not out-dated: it's just got different strengths than Cocoa does.

There are four major languages used for OS X development these days:
  • C++
  • Objective C
  • Java
  • Objective C++
Python is getting a lot of attention lately and Apple finally poured a little love onto AppleScript Studio in 10.4 so you would do well to study either of those. The transition to OS X programming with Cocoa+Objective C will be easier if you already understand OOP concepts and SmallTalk. In 10.4 you would do well to study up on ERD diagrams: it can save you a lot of work. Most of the standard UNIX programming concepts work pretty well in OS X, if you have plans to write 64-bit applications then you should get comfortable with C/C++ programming and Pipes: there's really no other way to do it because Cocoa isn't 64-bit clean. If you know VB6 already then you can get a jump by ordering a copy of RealBASIC. I'm not sure why everyone seems to expect you to develop using Xcode now: powerplant & code warrior used to be perfectly fine

The three books I would most recommend are Sams’ Cocoa Programming O'Reilly’s Learning Cocoa with Objective C and New Riders’ Mac OS X programming.

The Sams book is an in-depth reference reference that covers not only how to use the IDE and APIs but also explains why Mac OS X is different from on other platoforms; for example, Cocoa force MVC patterns down your throat until you crap controller objects. I bought my copy when Project Builder was still the norm so (unless they've updated) be prepared to spend a few minutes mapping the old interface to the new while you work through examples.

The O'Reilly book is a little light on details. It's got a very accessible introduction to [strike]Core[/strike] Foundation and Objective C and it introduces the debugging tools very early on but I found it to be more of a high-level overview of Mac OS X development rather than an in-depth guide to Cocoa.

I found ADC nearly useless as a 'getting started' resource. Once you're comfortable with how things work it's a respectable API reference and you can generally get the basics of unfamiliar/new APIs pretty quickly. That said, there are enough holes in the documentation that I don't think it's worth the $500+/year unless you take them up on offers like WWDC tickets or use of the testing facilities: the student membership has served me well enough.

To be honest I haven't finished the Carbon Book (Mac OS X Programming) but the parts I have read made it worth the $50 or so that I paid for it.


EDIT: I said "core foundation" when I meant foundation. Doh!
roadwarrior
When I said that Cocoa apps were the "native" type for OS X, what I really meant was that they would only work on OS X, while Carbon would work on 9 or X. I didn't mean to imply that Carbon apps weren't native as well.
FriedApple
Thank you very much evn show and everyone who replied. I have a good direction in where I would like to go now.

Thanks so much. If anyone else has any input then that would be great as well.

Mark
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.