02.23.09
Posted in AJAX, Development, Mobile, javascript at 2:46 pm by Twm
Last year, I wrote an article for the Reg about Google’s need for a mobile web platform which has Gears like functionality. There are a couple of ways of achieving this on S60, one is the Gears plug-in (a non starter on S60), develop your own browser (Firefox are doing this, and Chrome may or may not appear on mobile), or wait for the built in browser to implement the relevant HTML5 standards which allow interfacing with client side databases.
As I mentioned previously, the support for “canvas” tag in the HTML5 spec fills the need to draw arbitrary shapes, and Google demoed the potential of dropping Gears in favour of standard HTML5.0 primitives at MWC:
http://www.mobilecrunch.com/2009/02/18/video-offline-gmail-web-app-for-webkit-browser-phones-demoed/
So all this standards love in is all coming together nicely, with the palm Pre getting in on the action. But I found it hard to find information about S60’s web browser and HTML5 support, anyone know?
Permalink
11.26.07
Posted in AJAX, Python, javascript at 5:00 am by Twm
Due to popular demand, I’m publishing my iTunes remote source code here
Read the rest of this entry »
Permalink
07.20.07
Posted in AJAX, Mobile, javascript at 10:51 pm by Twm
We had a presentation at work today by some enthusiastic folk from the wireless industry which took me back to 1999.
As part of the talk, the words “widgesphere” and “widgetization” were exchanged without a trace of irony. This of course relates to the hype wagon which surrounds the widget engine which Nokia announced recently.
It will be nice to have another application programming environment for ‘creative types’ but I tried to convince my manager to just replace the word widget with app and see if the proposition was still as revolutionary. For me the word widgets just means something you spent an hour configuring and chosing when you get a new PC and then disable after a couple of weeks when you realised that you can see what the weather is like by sticking your head out the window.
I’d much prefer to write web services using AJAX than C++ and thousands of _LIT() statements, but as an app development environment it’s going to need access to native APIs and a persistence model (something like google gears) to float my boat. Once you start adding lots of native calls, it starts to look like a clunkly version of flash without debugging tools.
Permalink
09.26.06
Posted in AJAX, Python, javascript at 8:52 pm by Twm
My first AJAX app
I’m now officially Twm2.0 and i feel great.
What is iTunes Remote?
Lets say you have a nice PC hooked up to your swish HI-FI. It’s very inelegant and not very modern to have to go over to the PC every time you want to change the music or mute.Wouldn’t it be great if you could use your mobile phone to view playlists, skip tracks and mute all from the comfort of your armchair or bed.
Enter iTunes remote. It turns any device with a web browser into an iTunes remote control. This could be a slim laptop, or a modern wifi enabled cell phone.
(click image for full screen shot)
What are the main features of iTunes remote?
- Log into iTunes running on a remote PC in the house with any web enabled device
- Click on the arrow next to a playlist to play it
- Browse playlists and select an individual song. One click will cause the host PC to start playing.
- Free text s earch for song,artist. One click on the results causes song to play
- Stop/mute whatever is currently playing on iTunes
- Display of album art for the current song retrieved from iTunes store.
- Valuation of music – it displays how much money you have spent in ITunes store (assuming 79p per track)
- Wake up timer – register a wakeup time and a playlist to gently ease you out of bed in the morining
The Web UI can be served in two flavours:
- Desktop grade which uses advanced browser technologies to emulate the iTunes UI.
- Simple device grade which uses simpler technology to deliver a multi page interface for devices with less power.
What use is it?
It was developed while I had broken my ankle and femur and getting up onto crutches to change the tune was a bit of a pain. So the driving use case is for immobile people to make use of their mobile in a local context.
But, what is great for the immobile is fantastic for the rest of us.
Technical notes
The aim of the design was to provide an excellent remote control on a device without having the user install anything. The chief advantages of this approach is.
- No client install. User just fires up a bookmark in the mobile web browser
- Target mutiple devices – even ones which haven’t been invented yet
- Almost Zero upgrade cost for user. e.g a new cell phone just needs a new bookmark in the web browser
Implementation details
The iTunes remote solution is authored in two parts following the “AJAX” model.
- Seperation of content and display – DHTML + CSS takes care of the layout client side, python produces XML data.
- Currently uses Apache web server to handle mutiple requests
- Apache serves a single AJAX front page for the UI, there are no page reloads.
- The python scripts use the COM interface exposed by iTunes to control the application
Challenges
A key challange in creating a consumer grade remote control is to ensure trouble free install. Bluetooth is a one approach. BT is clearly designed for local area connection of two devices and has concepts such as one time pairing for exactly this sort of use case. BT however requires an application to be written for the target device which contradicts the design goal.
Superficially, the web server based approach seems simple enough in a wifi household. The user installs a service on the PC and then points the mobile web browser to the URL of the server. The problem is that the host PC may be hidden behind a router, and complex configurations of router ports and firewalls.
I’d like to know what the best way of doing this is and will be looking to UPnP for the future. I only want a clean easy way of exposing a web server to another device on the same network (of course without running any code on the device).
Nokia 9500 iTunes Remote photos
The search query page:

The result of selecting a song from the search results:

Permalink