Mac XCode Cocoa development

I recently started a 9 month long class in Mac and iPhone Cocoa development. Having just completed the first homework assignment, I can comment a bit on the development process.

The reasons for doing this class, in roughly descending order of importance are:

  • To be able to create and sell iPhone apps. This seems to be a lucrative market, and I have several ideas for killer apps (assuming someone else doesn’t get there first and make them “killed apps”).
  • To be able to create extension iPhone apps for AstroPlanner (i.e. a means to be able to execute an observing plan in the field on an iPhone or iPod Touch, or one of the mystery Apple tablets rumoured to be released this week).
  • To learn how the professionals create Mac Cocoa applications.
  • To improve my resume for future employment opportunities. My current activities just ain’t paying the bills – or even a small fraction of them for that matter.
  • When I “retire”, I will be doing Mac/iPhone programming only (Windows and Linux just give me endless headaches). Although REALbasic does a pretty good job of Mac apps, and will soon be producing Cocoa apps and probably iPhone apps, it just can’t equal Apple’s tools for app quality (mainly because of its cross-platform nature).
  • I like learning new stuff.

Cocoa development on the Mac is done using Apple’s free XCode and Interface Builder (IB) tools. XCode is a coding IDE and supports several platforms and languages. IB is the “matching” IDE for developing the graphical user interface (GUI) parts of the app. The language used is Objective-C, which is a mix of C and Smalltalk.

Coming from the REAL Studio IDE and REALbasic to XCode/IB and Objective-C feels like what an accomplished Tiger Moth pilot must feel like being place in an 747 cockpit. You know that the plane flies using the same rules, but instead of two dials and a handful of switches, all of which you know intimately, you are faced with seemingly unbelievable complexity.

However, by ignoring 99% of the gauges and switches, you can still get to fly. I’m hoping that I can continue circling the airport for a while before I am forced to delve into the reasons for all this complexity.

Most of my work for the past several years has been using REALbasic, Java or Python. These are all strongly object-oriented languages with built-in garbage collection or reference-counting mechanisms that make the languages a breeze to work with (mostly). Objective-C does have garbage collection, but only for Mac OS X 10.5 or later apps, and not on the iPhone. This means having to deal with a whole mess of memory management. It currently has my brain twisted into a Möbius loop trying to figure out all the ins and outs.

However, my brain likes new challenges, and this looks like it should keep the grey cells charged up for a while to come.