Friday, November 19, 2010

GWT and PhoneGap

Inspired by David's blog entry "GWT + PhoneGap = native mobile apps quickly", I decided to give this a try. Here are the steps I went through.

  1. I downloaded PhoneGap and went through their basic tutorial using XCode. The template leaves you with an empty 'www' folder in your project.
  2. I started with the basic code created by the Google Plugin for Eclipse and compiled it into its war directory.
  3. At this point I manually picked up the code and plopped it into the 'www' folder in XCode and ran the app in the iPhone emulator. This worked as expected as the sample app runs.
At this point I wanted to adopt a more native look to the app and thus I pulled in some CSS from the JQTouch project to make the app look a bit more like a native iPhone app.

Am at the point where I want to interact with iOS and specifically the Calendar on the iPhone. I've discovered that PhoneGap does not currently have support for the Calendar API which was introduced in the iOS 4.0 SDK. I may be facing the challenge of building a PhoneGap plugin in order to natively interact with Calendar from my GWT app.

I'm not very far down the road but it seems to me there are huge benefits in being able to apply the abstractions of GWT+MVP to building a mobile application that can run natively AND be cross platform.

Look for a Part 2 to this entry where I explore building a plugin to access the Calendar API.