Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

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.

Sunday, November 30, 2008

essential tools for developing Firefox extensions

I have been learning the process of writing extensions for Firefox for a few weeks now and thought I would jot down some of the tools I have found essential. I am using a Mac.

  1. TextMate. Not required of course but I find I open lots and lots of files all over the place that don't - xul, js, xml, etc.
  2. XULBooster I've been using Eclipse to organize the entire project and XULBooster provides a nice way to generate a skeleton project that for the most part works.
  3. XULExplorer I have been unable to get XULBooster to preview my XUL layouts but XULExplorer can. XULExplorer certainly has many more features than preview but it is all I am using it for at this stage.
  4. Not really a tool but I found it essential to code/test/debug to set a file in the extensions folder that points directly to my project root folder. That way I can code and test without creating an xpi file each time.
  5. Extension Developer add-on. The ability to reload Chrome without restarting FF is essential. Also, the interactive JavaScript console was a big help to me when I was trying to debug my first XPCOM component without having to worry about having a XUL/Javascript shell to deal with.