Beginning iOS

gmarik 2 min
Table Of Contents ↓

I’m learning (new to me) platform from Apple. Here are my impressions so far.

Objective-C (the ugly)

After programming Ruby for a while, Objective-C looks kinda ugly, ie:

+ (MyGizmoClass*)sharedManager
{
  if (sharedGizmoManager == nil) {
    sharedGizmoManager = [[super allocWithZone:NULL] init];
  }
  return sharedGizmoManager;
}

When you look at this code the very first time you’ll probably spend some time parsing syntax:

I’m not going to explain meaning here instead I’m just pointing out things that(to my taste) are ugly and too verbose. Nevertheless syntax shouldn’t be a big issue for any decent programmer. In case of Objective-C go read The Objective-C Programming Language guide.

Cocoa Design Patterns

Apple’s Cocoa Framework uses design patterns heavily. It’s a good thing as it clearly communicates the architecture. Though implementation may not be as clear. In my case I wanted to confirm that creating Singleton requires so much code in contrast to Ruby’s singleton. So probably it’s a good idea to bookmark Cocoa Design Patterns on official Apple Developer Portal. I’ll definitely be referencing this page quite often.

How to Start

I chose to start with iOS Programming: The Big Nerd Ranch Guide (2nd Edition)

I like it so far. It guides you through tutorials where you get to create small apps gradually introducing yourself to iOS programming and that’s exactly what I was looking for.

It’s worth mentioning though that even that the book came out in Jun 2011 it’s already obsolete. Mostly because of ARC and iOS 5. Still it doesn’t mean you should skip learning about manual memory management, as there is lots of pre iOS5 code out there.

Here’s my iOsProgramming-2e repo with code from the book

Learning material

There are some great videos on programming for iOS:

Also there are latest WWDC videos that are available to paid iOS developers, so it’s probably worth spending 99$ to become one. Esp because you’ll also get access to latest Apple’s(beta) technology including earlier mentioned ARC.

Read More
Vundle 0.9 got awesome installer
Design for developers
Comments
read or add one↓