Cocoa Development Part 1: The Beginning

Xcode.pngCocoa is an API consisting of many old frameworks from the NeXTSTEP days and new ones that Apple has introduced since then. Cocoa uses a language called Objective-C, which, being based on C, means that you can use C as well. Before you start to even learn how to use Cocoa and write code in Objective-C there are a few things you will need.

Apple provides a completely free package of Applications that can be used to develop in Cocoa and other languages, such as Java. To download this package, you will want to register for a free account from ADC (Apple Developer Connection). This will allow you to download the latest SDK (package of tools), and provide you with lots of sample code and guides. You can also purchase paid memberships, which include things such as hardware discounts and pre-releases of OS X builds. But if you are just beginning Cocoa development, I suggest you just register for a free account.

Apple Developer Connection.png

Once you have downloaded and installed the SDK, you can just begin programming. But if you have never programmed in any type of C before, you will most definitely need some help. This being the first part of a Cocoa series, I will not be giving sample code or instructions for how to do things, but I will point you to a few great books. The first one is Cocoa Programming for Mac OS X, by Aaron Hillegass. This is usually known as the must-have book for any Cocoa developer. It is an especially great source for those starting out. It guides you through how to do many things in Cocoa, starting with the basics, and ending with topics like Core Data and Core Animation.

Another great book that’s not so much about Cocoa as it is about Xcode is Xcode 3 Unleashed, by Fritz Anderson. This book focuses on the Xcode programming environment, and teaches you how to use Xcode to its fullest. But if you are more concerned with learning Cocoa than learning Xcode, then you may want to hold off on getting this book until you understand Cocoa a little better.

Although people have differing opinions on whether this book should be read by beginners, I will still recommend it. It is The C Programming Language, by Brian W. Kernighan and Dennis M. Ritchie (sometimes known as K&R). Although, as seen in the title, this is not about Cocoa or Objective-C, this can give you an understanding of C. Although knowing C is not necessary for programming in Cocoa, it is very helpful. Objective-C is pretty vast, but there are some things that you may have to do in C, so it can be very helpful too. It is really up to you whether you would like to read this book.

The last book I will recommend is Stephen G. Kochan’s Programming in Objective-C 2.0. Objective-C 2.0 is very new, and some other books may have not been updated yet to cover it. It is great for beginners; it really teaches you how to program (as suggested in the title). It is much along the lines of Hillegass’ book, even though it is not usually seen as a must-have. I highly recommend this for you beginners.

I hope this has given you the tools you need to begin learning Cocoa. You should expect many more of these articles which will cover more advanced topics in Cocoa, Xcode, and anything related to Cocoa development. Happy programming!

Comments

3 Responses to “Cocoa Development Part 1: The Beginning”

  1. Alexandre on February 3rd, 2009 10:29 am

    Very interesting for beginners (as me!): thanks.

  2. l33t speak on February 3rd, 2009 11:13 am

    Would love to see more articles like this macapper’s =)

  3. Software Lösungen - Linksammlung « meinekleineApfelkiste.de on February 9th, 2009 10:17 am

    [...] – Scripts & PlugIns in Gimp (engl., makeuseof) – Cocoa Development Part 1 (engl., macapper) 02.02.2009: – iPhone Klingeltöne selbst gemacht (macwelt.de) – Von Wordpress zu [...]

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!