问题
I'd like to learn how to write application for Mac OS X.
Like how to use XCode properly, Cocoa syntaxes and examples, etc.
I'm already a web developer using ruby, php, mysql, rails, etc.
I looked through google quite some times but never found something palpable to learn from.
But I really want to make my own application, for fun and maybe business later.
Thanks a whole bunch for your tips!
回答1:
To jump right in as quickly as possible, I'd recommend going through the following Cocoa Dev Central tutorials:
- http://cocoadevcentral.com/articles/000081.php (C)
- http://cocoadevcentral.com/d/learn_objectivec/ (Obj-C)
- http://cocoadevcentral.com/d/learn_cocoa/ (Cocoa part 1)
- http://cocoadevcentral.com/d/learn_cocoa_two/ (Cocoa part 2)
- http://cocoadevcentral.com/articles/000082.php (Style part 1)
- http://cocoadevcentral.com/articles/000083.php (Style part 2)
Once you've read those, you should be able to do quite a bit on your own, just using the documentation in Xcode (option-double-click on a class name in Xcode) and Apple's developer site.
回答2:
Aaron Hillegass's book "Cocoa Programming for Mac OS X" is certainly up there. It would also be well worth your time to learn the C language well.
回答3:
You should start by learning Objective-C. Programming in Objective-C is an excellencent introduction to the language
If you're looking for a free resource this is an excellent web-site
Only after you have a solid understanding of the language would I worry about the different frameworks available.
回答4:
The first thing I would start with is Automator. In fact, it's what I did start with. Solve a couple of easy problems with it, like renaming iTunes songs or photo manipulation. In the process, you'll probably think of an action you want that's not included. You can write it yourself using AppleScript.
Now you've got the basics of two desktop programming systems for MacOS in about a day. It might seem silly to learn these two super-basic systems, but in the process you'll learn the flow of desktop development and get a couple of "quick wins" in before you move on to XCode. You'll begin to think of your Mac as more than just a web client.
If I were you, I'd check out RubyCocoa next. It's a language you're already familiar with, so you'll be able to score another couple of wins here, too.
When you're ready to take on Objective-C, Cocoa Is My Girlfriend is a great introductory resource.
回答5:
I would start with the currency converter sample Apple provides.
This gives a nice introduction to Xcode and Interface Builder.
You could then try to implement the same basic application but with bindings.
As you seem to have experience in some interpreted languages, you may have troubles with the memory management in Objective-C at the beginning.
You can turn on Garbage Collection to make your life easier.
If you want to use your knowledge to create iPhone apps, you should learn the memory management concepts as there is no garbage collector available on the phone.
The podcasts on the Mac Developer Network also contain some good information.
回答6:
I was in the same situation some time ago, struggling to learn mac dev, read a lot of books, and it was hard for me to retain all that information, but I stumbled across CocoaCast where you can find lots of video tutorials on Mac Development! And it's totally free to watch them, even to download them.
回答7:
Stanford recently put out a course on iTunes U that teaches you how to program on the iPhone. Because the iPhone uses the same programming language as OSX, a lot of what they talk about can be transferred to Mac app development. Best of all, the course is free to download and watch, and has a bunch of sample material that goes along with it. Click the link below to open it in iTunes.
iPhone Application Programming
回答8:
Check out Apple's Developer Documentation, which seems to be getting more and more attention over time, and has become quite good for beginners to start with.
来源:https://stackoverflow.com/questions/1362476/whats-the-best-resource-to-learn-how-to-write-apps-for-mac-os-x