Design and Data Structures


On Tuesday afternoon we started our 3rd paper for the semester, Design and Data Structures. In this paper we are introduced to iPhone application development using XCode, Objective-C and Cocoa Touch. These are all keywords that I jumbled up a bit when I started exploring it myself a couple of months ago, but now it's all clear what the difference is. Objective-C is the language, based on C (as one could guess). Cocoa is the framework that you can draw from when making applications for OSX. It contains libraries and UI elements that you can reference in your code. Cocoa Touch is the same thing but it's the iPhone/iPad framework and it's UI elements. XCode is simply a development environment supplied to make your applications in. It's the Complier, and a separate program called Interface Builder where you can drag & drop UI elements to build your interface. So, a couple of months ago I might have said to anyone who would listen (er, which is no one really) "I'm going to try to learn XCode" meaning I was going to learn iPhone app development, I sort of sounded like someone saying "I'm going to learn Dreamweaver" when they really meant they wanted to learn HTML and web development. *sigh* when did I become the kind of person who finds that mildly amusing...

We have a guest tutor, a man who has built an iPhone app and published to the App Store. Tuesday was theoretical, we were introduced to some concepts on the Objective-C language, but much of it would have gone over people's heads, although hopefully enough retained so that it reveals itself when it's nature is understood.

Wednesday and Thursday were much the same, the concepts were... well conceptual. We were given a handout on Wednesday, if we followed it we'd have an iPhone app that didn't really do much but had graphical elements that responded to touch. I took that home and worked on it but didn't get it finished due to some interruptions at home, and then I got to a point where the stupid thing would crash on startup with no explanation. Debugging was a bit difficult as I didn't really understand the code so I just listened to the Tutorials. We received our first assignment for this paper, worth 30% of the total, to build a stopwatch application. The basic application had been built but was missing critical parts that we had to add. I decided to duck out and find a book shop that had a book on Objective-C. Nowhere in town had anything, and if they had have I'd probably have been charged some ridiculous price, in NZ we seem to be ripped off with the price of text books. I also went to the AUT library twice, the first time I found nothing, the second time I decided to loosen my criteria as I was getting desperate and this time found 2 great books, although not on Objective-C.

The first one, Learn C on the Mac is around 300 pages and easy to read. The second one I was very happy to find, C Programming Language (2nd Edition) - written by the creators of C and regarded as the THE book on C. C is a good primer for Objective-C as Objective-C is an object-oriented superset of C and you can write C code in Xcode and it will compile and work. I have an Objective-C book lined up, Auckland Public Library has the follow-on book to Learn Objective-C on the Mac. On Friday we were to work on our Stopwatch, so I stayed home and read the first book.