So, if you want to develop for iPhone you either have two choices: develop a web application or go native. Unfortunately, even if Mobile Safari is a fantastic browser, it doesn't yet implement all of the HTML 5 features. Assuming iPhoneOS 3 here, Safari supports the following:
- The new video/audio tags. Albeit using only mp4 containers, h264 video and AAC audio. Furthermore, it does so by opening the video player application, in effect exiting the browser
- It supports app cache. With the proper manifest, your application's assets will be stored locally. Opening the door for the application to run without connectivity
- Support for HTML 5 databases. First is the assets, then it's the data. With both, your application can potentially run without connectivity.
- Canvas. It supports canvas for more complex rendering.
That concept introduces a new, more sane, alternative to coding in Objective C and Xcode and supporting many different platforms. Basically, you write an HTML 5 application using GWT. So you're writing with Java 5 syntax in the IDE (and debugger) of your choice for the majority of the application. You only write a small shell containing web views in your iPhone application.
So how about porting to other phones? Well consider the following phones that have WebKit in some variant or another:
- Android. Ships with a WebKit based browser.
- Nokia S60. WebKit is now the default browser engine in S60 phones. Write a shell using C++ and Qt.
- Windows Mobile. WebKit is nowhere to be found. Again, not a problem since the Qt port to this platform has WebKit, write a shell using C++ and Qt.
- Pre. Ships with WebKit. Not only, but Palm only wants web based, HTML 5, apps to be written for its phone using WebKit. They even introduce some new DOM elements to access other services in their implementation.
- Finally, iPhone, write a shell in Objective C embedding WebKit.
Ah, NSObject reference counts, how will I miss thou? Well, not at all I must say.