Tag Archives: css

Mobile Widget Camp talk: Hello Cats

View more presentations from PanMan.

Today I gave a quick (really quick: About 3 minutes) talk on how easy it is to build a mobile widget. To show that I ported the jQuery Cats example to a mobile widget. In the talk above I go over all the steps needed to run web code on a phone. Not shown in the slides, but it was in the talk, is that this actually runs on phones :).

Comparing mobile widget platforms

picture-33 V.S. wrt_quickstart_button

Mobile widgets seem to be the new black. This week I tried two different mobile widget platforms: The Nokia Web Runtime and the Opera/Vodafone widget platform.

Both platforms make it possible to build applications that can run on mobile phones, developed in languages known to all webdeveloppers: HTML/Javascript and CSS. Nokia with it’s runtime (logically) targets it’s own handsets for this platform. Opera has a broader approach than just phones: They see the widget platform as something that can run on phones, but also desktop PC’s, set-top boxes, internet tablets, and even game consoles. While this sounds ambitious, Opera makes browsers for all these devices, so it might not be to far-fetched.

On a side note: It’s interesting how  the boundaries between applications, websites and widgets are all disappearing: These widgets are basically downloadable webapplications, which can run totally offline (but often will interact with the  data on the Internet).

File formats

To start with the good: Both platforms are really similar. They both use a renamed zipfile to pack a bunch of HTML, CSS and Javascript files with a config XML file into one downloadable ‘application’. Opera calls it’s config data config.xml, and it’s files .wgt. Nokia uses info.plist XML files (which have a really strange syntax, for XML files. Who came up with that?)  and .wgz for the files. But on general the differences here aren’t that big, and it should be possible to build one widget that runs on both platforms (if you copy the file to the two 2 extensions). The actual code is all standard HTML, with some (Javascript) extensions to interact with the device, and the various states a widget can be in (some can be dockable, for example).

A advantage of the Opera platform is that they target the (still developing)  W3C standard which (hopefully) leads to more interoperability between widget platforms.


The SDK’s they offer are more different: Nokia offers a HUGE SDK (seriously, 622 MB install to run some HTML code?!). Also their SDK will only install (and run) in Windows, which is a pitty as a lot of webdev’s use Mac’s these days (I know it’s possible to run windows apps on a mac, but it is less convenient). Another disadvantage is the need to signup on the Forum Nokia website to download the SDK: The signup isn’t too much of a hassle, but for me it took quite long for the confirmation mail to arrive. This SDK does allow you to run widgets, but doesn’t assist in the creation of the files (not that it’s too hard to do manually, but still). In their defense: they also offer a plugin for the Aptana Studio, and this will become the preferred method of development, but I wanted to use my own editors to start with. I have also taken a look at the Aptana studio, and that looks cleaner (but stopped working at my computer after a few hours).

Vodafone Betavine/Opera offers a small SDK, which consists of 3 parts. The first is a Betavine branded “widget packager”. This is a simple tool that assists in the making of the XML file, and the creation of the zipfile. It includes some sample widgets. It also allows you to add some know frameworks to your widget, but unfortunately the popular jQuery isn’t one of the included frameworks. While the process this isn’t too difficult to do manually, the wizard is a nice way to get started. Also included is the standard desktop Opera browser, that enables you to (test) run widgets. The third item in the download is a Betavine branded .sis file that can be installed on Nokia S60 phones to run the widgets.

Phone Integration

In terms of Phone integration the Nokia runtime is the clear winner: The widgets immediately work on the 5800 Xpress music I tried them on, and to the user look like other applications. The Vodafone widgets on the other hand, first required me to install the Vodafone Runtime on my phone. Even then the widgets (currently) don’t live with the other applications, but in their own, branded, folder. While this isn’t too complex, tasks like these are hard to explain to the average user. However I expect Vodafone to have their runtime pre-installed on phones they sell, and to have more device integration.

Another advantage of the Nokia platform is that it has Device libraries which enable widgets to access device specific data. This includes location, calendar entries, contacts, and other data. Having this access makes the widgets a true application platform, and are a big advantage over standard (mobile) websites that don’t have these capabilities. This is something that is missing from the Opera platform.


I now have a phone which has 2 widget runtimes: Both the Vodafone/opera and the Nokia one. Both are similar in what they support, and while Vodafone/Opera had a bit smoother process (for me), the Nokia SDK also works and currently offers device integration that the Opera platform lacks. The next few months we’ll see a battle between these two, to become “the one true” widget platform. My guess is that both grow towards each other: Opera will add device capabilities (starting with location), and since the Opera one is backed by the W3C, it will become the standard. Nokia will simply start to (also) support this standard, which shouldn’t be too hard: Mostly adapting a different type of config file and extension. However I do hope that standard will offer the device capabilities that Nokia currently has.

Important to conclude is that it’s really simple to develop for both platforms: I have ported some HTML/Javascript code I had to both platforms in just a few hours. So get hacking, and build a nice widget!

(Full disclosure: I organized MobileDevCamp, sponsored by Nokia, and I am organizing Mobile Widgetcamp, sponsored by Vodafone. However this post only reflects my own opinions).