Home > Articles > Home & Office Computing > Mac OS X

Erica Sadun on the iPhone SDK, OS X, and the Computing Landscape

David Chisnall talks with Erica Sadun, author of The iPhone Developer’s Cookbook: Building Applications with the iPhone SDK, about the iPhone SDK, Objective-C, and what she'd like to see at this year's WWDC.
Like this article? We recommend

I recently had the opportunity to interview Erica Sadun, author of The iPhone Developer's Cookbook: Building Applications with the iPhone SDK (second edition in progress at the time of this interview). Erica has been very active in iPhone development. I wanted to ask her opinions on the platform, and its relationship both to desktop OS X and the more general computing landscape.

David Chisnall: There are lots of rumours about what will be announced at the keynote this year. Is there anything you're particularly hoping for?

Erica Sadun: I have been hoping for a new, larger tablet running iPhone OS that might compete in the netbook/Kindle arena. The iPhone works very well as a sub-netbook, but greater screen space would really help bring the unit into the boardroom, the classroom, and, for medical personnel, the exam room.

DC: You mentioned competing with the Kindle. Where do you see eInk-based devices going, in terms of convergence with things like the iPhone or iPod Touch?

ES: eInk brings something special to the table that is separate from what, say, an iPod touch offers. As the latest display technologies continue to evolve and mature, I can see there being two branches of hand-held development for a while. Do I want to see Apple going into eInk? It's certainly an avenue that offers great possibility, but at the same time beyond text readers, is there a compelling need for that low-power, high-contrast kind of display? So I'm torn. It's cool stuff, but I still would rather have a touch-based iPhone OS tablet rather than a Kindle when all is said and done.

DC: On the software side, is there anything you're hoping will be added to the Cocoa Touch SDK at the WWDC?

ES: I would love background processing and, especially, command line access. I am not holding my breath. At all.

DC: When and why did you originally learn Objective-C? What other languages were you most familiar with at the time?

ES: I was fortunate enough to learn Objective-C from Pixar's Randy Nelson (a flying karamazov programmer) in 1989 at a NeXT seminar, during beta 0.8 of the NeXT Step OS. (I think it was '89. Might have been '88.) At the time I had spent some time professionally programming in Lisp, but my background was more specifically in C, which was the lingua franca of the day.

DC: Having spent a lot of time working on the iPhone, what do you think the most difficult thing is for people coming from a desktop-Cocoa development environment?

ES: On the desktop you have a full multitasking environment and huge screens. On the iPhone, the rule goes: Small Screen, Big Fingers, Little patience. Everything else follows from that. You must design in a way that is respectful of the small space available to you (not to mention your user's eyesight!) And you must understand that you only get access to your user for short spurts of time. When calls come in or the user steps off the commuter bus, you need to clean up after yourself in a way that will let that user pick up where he or she left off.

DC: On a related topic, do you think it's easier for people unfamiliar with Objective-C to learn to program the iPhone or OS X on the desktop?

ES: A strong programming background helps when moving to any new platform, regardless of the language. If you have already mastered procedural and object-oriented systems, then jumping into Xcode, Cocoa Touch, and Objective-C will be far less painful.

At the same time, the iPhone is a great platform to learn programming on. You can build very simple programs that take few lines of code and deliver high impact applications. So if you've got a basic application skeleton to work with, like the kind that Xcode provides through its pre-built templates, you can learn hands-on.

DC: I was recently asked why I thought Apple didn't put Flash on the iPhone. What are your views on this? Do you think having Flash would harm native application development?

ES: Apple has always maintained that Flash would consume too many resources, but if rumors about upcoming iPhone models hold true (faster processors, more RAM), I could see Flash on the iPhone OS, particularly for any tablet devices if Apple gets around to selling them.

As for harm? I really doubt that. I don't think that any avenue of development harms another.

DC: Before the official SDK was released, a lot of people were writing iPhone "applications" in JavaScript that ran in the browser. With the SDK, a lot of applications take advantage of the always-on network environment of the iPhone. Do you see the iPhone blurring the line between local and web applications? Where do you see this going in the next few years?

ES: With the latest HTML standards with off-line data storage, we've really entered the age of standalone web applications. It's just one more way of delivering product to consumers.

As for the second part of your question, the iPhone is part of that blurring, that change. It's no longer important where you are and what platform you compute on. It's all about your data and where it lives. So long as you can sync to a central data store, applications get re-defined. It's already happened with activesync and Entourage.

I can sort through my mail on my laptop and my desktop reflects those changes. The iPhone is riding that wave, along with the Mac and every other platform out there. The difference is that the iPhone can fit into someone's pocket and connect inexpensively to WWAN services. You may lose some user interface options to that size, but with centralized data computing, you don't miss out on access.

DC: AppKit was originally designed to run on machines with a 25MHz CPU, 8MB of RAM, and no GPU. The iPhone is a lot more powerful than this and yet Apple chose to introduce a new API. Why do you think they did this? What are your views on the removal of NSCell, an optimization designed for memory-constrained systems?

ES: From an API point of view, Cocoa Touch is simply beautiful. Rather than stay wedded to the old way of doing things, Apple built this entire SDK from the ground up, bringing over the best classes and providing replacements as newer, better version became available. It's astonishing how much Apple delivered in terms of a public SDK given the amazingly short period of time they had to do so.

It's easy to complain about certain design choices Apple made (and trust me, I do so both professionally and loudly), but it's also easy to overlook what a spectacular result they've delivered with the 2.0 and 3.0 SDKs.

Their classes and their APIs have been designed with mobile computing in mind, and I'm well satisfied with most of the results. Many classes that I missed in 2.x showed up in 3.0, and I'm sure that many more will arrive in 4.0.

DC: As you said, Apple had the luxury of not having to think about backwards compatibility when they designed the Cocoa Touch APIs. This isn't the case on the desktop, or for other platforms, which have accumulated a lot of legacy-compatibility requirements over the years. If you had to pick one abstraction or concept that made sense in the '80s when these other systems were designed, but that the iPhone managed to disregard, what would it be?

ES: I'm going to answer this sideways. Because the one thing that jumps out at me, that really defines the 80's, was the advent of desktop multitasking, the ability to run more than one program at a time, as controlled by the end-user.

With the iPhone, Apple completely stomped on that, and I don't mean that in a bad way, as you'll see. Here's a full-powered Unix-based OS, and it's been transformed into a device where you can run only one thing at a time and you can't switch back and forth between tasks. (Unless those tasks have been provided by Apple, like music control and phone calls.)

And it's not really just Apple doing this. If you look at the latest Linux-based Netbooks, they've taken the same "it's a device not a computer" philosophy, hiding away the underlying OS with all its power and providing the simplest possible, most approachable UI, as with the HP Mini mi.

From an end-user perspective, this has been a huge win for Apple, as for HP and other manufacturers. We don't care what OS is running on our TiVos; the gadgets just work. They're simple, they're elegant, they're fun.

From a developer's point of view, it's admittedly limiting and frustrating. But at the same time, the more that a device like an iPhone succeeds in the market place, the more work there is for developers. So for every fussy technical door that closes, Apple is certainly opening a lot of well-designed very-inviting other doors.

DC: Do you think being Objective-C-only is a barrier to entry for iPhone development? Are there any other languages you'd like to see supported?

ES: This is a hard question to answer because I so passionately love Objective-C, which weds Smalltalk and ANSI C. These are two languages I spent many years using. Apple supports Objective-C++, which is an Objective-C extension of C++ (or a C++ extension of Objective-C). This support has brought in a lot of developers who otherwise might be turned off by Objective C.

The truth about Objective-C is, though, that it's insanely easy to learn. You can master it completely in a couple of hours if you start with a C-language background.

But programming on the iPhone isn't just about Objective-C. It's about Cocoa Touch, the libraries and frameworks that provide all the classes you use on a day-to-day basis. And mastering Cocoa Touch is a much broader problem. That's why I love writing pre-built code snippets that demonstrate how to solve problems using Cocoa Touch classes and calls. That kind of mastery, which will obviously be more available to Mac Cocoa programmers than, say, some guy who just walked in off the street, is one that must be built over time.

DC: There have been a few high-profile cases of iPhone apps being rejected from the App Store. Do you think having Apple as the gatekeeper for all iPhone software is a problem for iPhone development, or do the advantages in terms of vetting and stability outweigh this?

ES: I can argue both ways. As for the current system, it desperately needs a ticketing system so developers are not left in the dark about where their app lies in the review process. More transparency and a better system for protesting decisions would eliminate nearly all developer complaints.

DC: At the moment, the iPhone has a much smaller market share than Symbian or even Windows Mobile. Why would you encourage developers to work with such a niche platform?

ES: I don't think you need to actively encourage developers. I think the iPhone itself sells the platform. Anyone who is excited and passionate about the iPhone who would like to develop for it can join in. The SDK is a free download, and if you decide you want to make a commitment to iPhone development, the $99 per year fee is a low business cost for gaining access to App Store.

DC: The iPhone SDK is now at version 3; how much do you feel it's evolved since its creation? What are the most important changes?

ES: The first version of the iPhone SDK was somewhat rushed out to meet announced deadlines. They could have done with another year or so to really develop what was essentially a new OS X platform, complete with development environment. In the year and a bit, the SDK has greatly matured as has the iPhone OS itself. The most important changes are stability and completeness. Classes that were MIA at the beginning have now appeared or show signs of being added soon. Apple can now step back and start designing mobile-specific libraries rather than focusing on getting the OS and basic SDK finished.

DC: What projects are you currently working on?

ES: I'm hard at work writing the 3.0 update to my iPhone Developer's Cookbook. Like last year, it's being held back by the ongoing (and frustrating) NDA. After the Cookbook update, I'll be collaborating on iPhone Unleashed, which will focus more on best practices and App Store.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020