W3C home > Mailing lists > Public > www-tag@w3.org > December 2009

Re: PhoneGap and W3C Widgets convergence

From: Dan Brickley <danbri@danbri.org>
Date: Mon, 21 Dec 2009 16:07:28 +0100
Message-ID: <eb19f3360912210707o2e41d36byea57e98a477fac00@mail.gmail.com>
To: Robin Berjon <robin@berjon.com>
Cc: www-tag@w3.org
On Mon, Dec 21, 2009 at 11:59 AM, Robin Berjon <robin@berjon.com> wrote:
> Hi,
> I just noticed ACTION-345 "Investigate possible convergence of PhoneGap and W3C Widgets" [0].
> Just as an FYI:
> - the DAP WG is taking input from PhoneGap into consideration, and is looking at PhoneGap as a potential implementation vector  this is not directly related to widgets per se, but having the same APIs makes using the same packaging format a whole lot more useful;
> - and more to the point, Dan Brickley (copied) has been toying with making PhoneGap able to take a W3C Widget as input to essentially "compile" it for the various target platforms. This is similar to the approach that RIM uses whereby they munge widgets into another format that works with their Java-based stack.
> I don't know how far Dan's gone with his experiment and I certainly don't want to put him on the spot (Hi Dan!) but it'd be a shame if Noah had to duplicate investigation that's already been performed.

I can summarise my brief investigations easily.

Background: I have an iphone, and my local machine is already
configured for mainstream iphone development (including massive hassle
of setting up provisioning profiles, account on the developer portal,
etc.). So my machine and Xcode installation was already set up nicely,
eg. I regularly build and install my own full iphone app-in-progress.

So - I downloaded PhoneGap, skimmed the docs, and generated /
installed the xcode addon. This lets me create "PhoneGap-based"
projects within XCode. For example, just now I went to "New Project"
and made one called "hello_robin". Here is the filetree:

dyn26-234:hello_robin danbri$ find .

So, if you build/install this, you get a default app whose index.html
has some buttons and displays showing off various of the
cross-platform PhoneGap APIs.

What I did, very simply, was just to replace that index.html with the
test widget from your Widgeon filetree:

(The unzipping was done by hand; the manifest file was ignored)

Unsuprisingly (since it's just a simple Web page in a .zip, it worked
fine. I even added an event handler to make the phone vibrate whenever
anyone touched the image, and that worked too.

And that's as far as I got. There is clearly scope for better workflow
integration, eg. handling of the zipping/unzipping of widgets. But
with this simplest of test cases, the result was just fine. To recap:

1. get a mac set up for iphone dev w/ xcode
2. install phonegap and addon for xcode
3. create a new phone-gap based project
4. add an unpacked widget to the generated www/ dir in the project
filetree, using index.html as the front page
4. compile/install it to iphone

The idea of this stuff also working on other mobile platforms, and
with rich and increasingly standardised APIs, is pretty exciting...



ps. If anyone cares to buy me an Android phone I'll be happy to test
things there ;)

> [0] http://www.w3.org/2001/tag/group/track/actions/345
> --
> Robin Berjon - http://berjon.com/
Received on Monday, 21 December 2009 15:08:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:56:31 UTC