Learning iPhone Development
I have often heard it said by old time Cocoa folks that making the transition is not so much a steep learning curve as it is a steep un-learning curve. You have to retrain your intuition so that you think like Cocoa.
Being an old Cocoa developer (from NeXT 0.9 days) and a Java developer I totally get that and agree. The transition back for me was not as hard as it is for someone without prior knowledge but there were several things that hit me like 'duh that is how it should be, why did I not think of that' when I got back into Cocoa.
From what I have heard from folks (questions and such) the hardest part of moving to the iPhone has been groking Cocoa and retraining their intuition.
Another thing that has come up often in the last couple of days now that my Core Animation book has finally shipped sans the iPhone bits is the question 'hey how am I now supposed to grok CA on the iPhone?'. And my answer is the same as its always been, learn Cocoa (or Core Animation, Bonjour, Target/Action, Key Value Coding etc etc) on the Mac and you will be well suited to doing iPhone development.
While I said this to several people I did not have anything that did not break the NDA that was decisive to show. So I decided to do some research into the public data that I could use to support my claim that if you know Cocoa you can do iPhone. So I re-watched Scott Forestall's part of the SDK announcement and took some screen shots. While there are some major areas where Scott says 'we tweaked it', or 'we enhanced it' there are some even more major areas where he says 'hey its the same stuff that has been used for years on the mac, its proven, works great and is easy to use'.
Here are the screen shots with most of the time stamps from the SDK keynote.
The OS stack is the same except for Cocoa Touch (around 21:30 in the keynote)...
The Core OS is almost identical, power management was tweaked, but kernel, bonjour, certs, key chain, TCP/IP etc all the same (about 23:45)...
The Core Services are very similar, Collections - same, networking - same, file access - same, SQLite - same, net services - same, etc (about 24:30)...
Core Animation was released publicly on Leopard first but was written for iPhone (about 25:45)
Media, much the same, Core Audio, OpenAL Quartz 2D, Core Animation, Open GL ES, PDF etc
Cocoa Touch, 'we took everything we knew about doing great OO UI frameworks and built Cocoa Touch' (quote paraphrased from much earlier, about 21 min or so). Cocoa Touch - inspired by Cocoa, View Hierarchy - same, Localization - same, Web View the engine behind Safari now a control, based on WebKit (about 27:30)...
Tools, enhanced for iPhone, Xcode, IB, Instruments all the same but enhanced for iPhone (starts about 29:00 and ends around 33:31)...
So my assertion to the folks out there wanting to know how to do iPhone development is to learn Cocoa with one of the many resources available to do that and you will be very well suited to do iPhone work. And maybe that is a side benefit to the whole NDA thing, many folks will learn Cocoa that would not otherwise and the developer community will grow.
A few resources, but there are lots more;
- Cocoa Studio (disclosure - I'm one of the instructors in this class)
- Cocoa Programming (disclosure - author is the other instructor in the Cocoa Studio)
- Cocoa Programming for Mac OS X
- Core Animation (disclosure - me again)
- Cocoa Programming
- iPhoneLive (disclosure - I'm a co-chair)
- Cocoa Blogs
- Cocoa Dev Central
- Mac Dev Network
I can't wait to see what you build!
Permalink 1 Comment - Add YoursNYC Gig done - press in the NewYorker mag
I finished up the NYC gig (as I called it) right before vacation. The app should be on the store this week. It got some positive press here. It was a ton of fun to write (except for some of those niggly performance bits) and there is some really great content in there. Looking forward to it being on the store.
Fun times indeed :) Now to find that next gig, anyone looking?
Permalink Add A CommentiPhoneLive 2008
The iPhoneLive schedule is all but finalized. Still waiting on some bio's and pics to get the site updated. I'm really excited about Steve Demeter's talk. It's going to be inspirational to see/hear how someone took an idea and is living the dream.
Looking forward to seeing you there!
Permalink Add A CommentNSColor & CGColorRef
While writing an example of how to understand the 3D transforms possible with CALayer I had a bit of an epiphany about how to make building colors easier. Instead of the utility class I'd been using I cooked up this little category on NSColor. Of course I should have thought of this first but my brain has been weakened by years of Java coding...
@implementation NSColor(CGColor)
- (CGColorRef)CGColor {
CGColorSpaceRef colorSpace = [[self colorSpace] CGColorSpace];
NSInteger componentCount = [self numberOfComponents];
CGFloat *components = (CGFloat *)calloc(componentCount, sizeof(CGFloat));
[self getComponents:components];
CGColorRef color = CGColorCreate(colorSpace, components);
free((void*)components);
return color;
}
@end
This has the disadvantage of creating a new instance on each call. If you (or I) wanted to get really fancy you could look to see if the NSColor is a named instance and if so place the CGColorRef into a CFDictionary and thus cache the CGColorRef's but I think I'll leave that to my next Epiphany.
Code is licensed under Apache 2.0, do with it what you will.
Permalink Add A CommentO'Reilly iPhoneLive Conference
Exciting times indeed.
Raven and I are really excited about this event and can't wait to see you there!
Permalink Add A CommentAd Supported iPhone Apps?
This is a question I've been asking myself a lot recently. With the release of my (iTunes link) third casual game for the iPhone/iPod touch I am starting to get a feel for what the market is like for casual games.
The number of downloads for Riddle Racer Lite (iTunes, the free version of Riddle Racer) is in the thousands a day, despite it's really bad average rating, while the $1.99 games get far fewer. Honestly I'd prefer it if Riddle Racer Lite would fall off the chart and get no downloads because people really don't get the app and I don't really like having an app with 1.5 stars average rating on my resume. But it continues to be in the top 15 or 20 of family/puzzle games. If we were to put ads into the app we could probably make some money on the download count despite the bad rating.
But, is this what we should do? I don't think so, and there are 2 reasons why. First free games require no investment on the part of the purchaser. Even if the app is horrible and the user deletes it after one use the developer still gets credit for the download. That encourages developers to crank out apps without regard for usability or even usefulness. Having a huge number of really bad apps on the store is bad for users and developers because it becomes impossible for the users to find good apps in the sea of bad ones. It also has the potential to dilute the brand as pointed out here in an article on Forbes.com.
Second big reason is that general advertising does not work, users totally ignore ads. Why should I put stuff into my applications that annoys my users. Why should we as users put up with stuff we just ignore? Does anyone not ignore ads? When ads come on TV we go get a drink, when ads show up in a popup we turn on the popup blocker, etc etc. Some argue that relevant ads are not annoying. I might agree with that but, how do you choose ads that are relevant to someone playing the Dot Game, chances are it can't be done. So if I were to put ads in that game they'd just be ignored. That would irritate my users and I would hate that.
My $0.02 worth.
Permalink 2 Comments - Add YoursMan What A Day
Man what a great day.
First off 3 of my kids plus another 6 or 7 of their friends are part of the inaugural FIRST Summit County Lego League. It should be a great time for sure, I totally can't wait to have 8 to 10, 9 to 14 year olds building Lego Robots in my office once or twice a week. Our first competition in Nov 8 in Colorado Springs. It's going to be great fun!
Next up the Cocoa Pragmatic Studio was finally announced publicly today. It's going to be a great time learning the ins and outs of Cocoa development. If you are new to Cocoa (Touch or Regular) there is a ton you can and will get out of this 3 day intensive class. Promises to be NDA breakage free too so nothing to worry about there...
I finally got to push a new version of Dot Game out the door. Still working on the Bonjour support but had a couple of feature requests and bug reports that I finally took the time to crank out.
Now if the NDA would just lift I'd have even more cool stuff to do and talk about! :)
Permalink Add A CommentEpisode 6 - The Final Episode
I finally finished Episode 6 of The Core Animation Screencast. Man is is way over due (sorry!). It is a bit long again but its really worth it (I think, but you will have to be the judge). In this episode we wrap things up with the final bits of transformation and filter goodness so that we get a really nice looking app. The episode still has to go through post production so it will likely be 2 or 3 days till its on the site.
Here is a teaser screenshot for the curious. The pics were taken by my amazingly talented wife on a recent trip to the Grand Canyon.
This has been a particularly fun series to put together. I really enjoy doing screencasts. If you have an opinion on what would be good to have next please let me know. I'm thinking an album art city would be fun to build but there is so much to cover for all the folks new to the platform. A nice Xcode intro or IB how too would be fun.
Permalink 3 Comments - Add Yours



