MobileCampVancouver2 Q&A w/ Brock Whitten on PhoneGap (JavaScript iPhone Access), Objective-C, the F!?#!ing NDA and More

Welcome back to the MobileCampVancouver2 Speakers Q&A Series. Today let’s welcome Brock Whitten (a.k.a. Sintaxi).

We currently have geo location, vibration, and accelerometer all working and camera support is extremely close. Next we are adding network detection and address book access. We have also been flirting with SQLite and offline support. Ideally, PhoneGap is also going to be ported to Blackberry and Android.

PhoneGap is a native iPhone application that instantiates UIWebView and loads a callback URL that points to a remote server. This essentially creates the bridge between the web interface and the iPhone. When a JavaScript request comes in that is looking to access the iPhone, PhoneGap will perform the necessary task (using Objective-C) and if applicable, will pass back the requested data in JSON or in the case of vibration, just perform the task.

Q: Can you tell us a little bit about yourself and your work at Nitobi?

Brock Whitten: It has been a fantastic experience working at Nitobi. Though I was brought on as a Ruby developer, my roll has expanded much further than that. Everyone at Nitobi possesses serious skill and for the most part all in different areas. This makes for a stimulating environment. No one is shabby on the Fooseball table either.

Q: What’s PhoneGap? (How did it all get started?)

Brock Whitten: PhoneGap was designed so we at Nitobi can use our strengths to build great mobile applications. I believe the web is the place to be and in many respects felt that learning Objective-C was a step backwards. So we started PhoneGap in San Francisco at iPhoneDevCamp. We went down with the idea and we got all kinds of help from the community.

Q: How does it work?

Brock Whitten: PhoneGap is a native iPhone application that instantiates UIWebView and loads a callback URL that points to a remote server. This essentially creates the bridge between the web interface and the iPhone. When a JavaScript request comes in that is looking to access the iPhone, PhoneGap will perform the necessary task (using Objective-C) and if applicable, will pass back the requested data in JSON or in the case of vibration, just perform the task.

Q: Any commentary on the Objective-C language and Cocoa libraries (from the point of a Rubyists)?

Brock Whitten: Syntax aside, Objective-C is somewhat similar to Ruby though it’s not very transparent. It’s hard to see how things are wired together. The libraries are impressive and Apple has provided a fair bit of documentation. I have learned to appreciate the strict conventions that the Ruby community has established. There seems to be many acceptable ways to do things in Objective-C and this makes learning a more lengthy process. Due to the nature of PhoneGap I have not spent much time with Cocoa but my experience that I do have with it has not been pleasant. It is a little high-level for my taste. Those who like programming with a GUI or a heavy integrated development environment (IDE) may like it.

Q: Can you tell us some challenges you faced developing PhoneGap?

Brock Whitten: Overcoming Objective-C has been our biggest challenge. Getting developer certificates has slowed us down more than it should and having to deal with memory management has caused hiccups.

Q: What’s the fucking iPhone non-disclosure agreement (NDA)? Can you talk or comment?

Brock Whitten: I am not used to working outside of the open source space. So the strict rules Apple has put in place has been new to me. I fail to see how it benefits them and developing for Apple has caused me to see the company in a much different light.

Q: Can you highlight some applications/examples using PhoneGap? How can someone get involved in contributing to PhoneGap
(development)?

Brock Whitten: There is an application called BigFive that is currently awaiting approval into the app store. As far as contributing goes, right now just using PhoneGap is helpful. Those who are interested in getting their hands dirty can fork the project on Github. We sure could use an experienced Obective-C guy.

Q: What’s next for PhoneGap? Any plans? Any new JavaScript APIs?

Brock Whitten: We currently have geo location, vibration, and accelerometer all working and camera support is extremely close. Next we are adding network detection and address book access. We have also been flirting with SQLite and offline support. Ideally, PhoneGap is also going to be ported to BlackBerry and Android.

Q: Any tips, tricks and advice on getting started with mobile development in general and with iPhone/WebKit/PhoneGap-powered mobile apps in particular?

Brock Whitten: I want to see people get really creative. The possibilities of what can be done with these devices is huge. The barrier of entry for developing on mobile devices is getting lower every day and the relevancy is constantly increasing. With PhoneGap, any web developer can build an iPhone app. There are few excuses to not get started.

Q: Can you tell us a bit about your upcoming MobileCampVancouver2 talk?

Brock Whitten: It’s great to see an event like this in Vancouver. I am eager to hear the talks and to get the word out about PhoneGap and using internet technologies to develop for mobile devices.

Thanks Brock Whitten for your time and insight. Learn more about about PhoneGap at MobileCampVancouver2. Questions? Comments? Send them along to the PhoneGap forum/mailing list or the Vancouver Ajax, Web 2.0 (3.0), Mobile Web forum/mailing list. Thanks!