March 30, 2010

Mobile SDKs

I met a nice guy who has a web page that presents an award-winning grill he's designed. He briefly mentioned the site that runs entirely on Flash and I offered to upgrade it for HTML, CSS and Javascript. I wanted to learn some CSS3 and MooTools on a real-world problem. The design consists of a menu, a large image and a caption. Images are switched either by timing or by user clicking next/back buttons, complete with fade out and fade in. As it came together I tested it on Firefox, Chrome, Opera, Arora, Safari, Konqueror and IEs 6-8. I decided to try out the popular mobile SDKs as well then. Namely, Nokia Maemo 5, Google Android and Apple iPhone. This is an overview and a quick, superficial evaluation of the mobile developer toolkits.

My aim was not to work on any platform-specific code, but to test out how these devices would display the page and the image transitions. I very much appreciate the ease of installation, good documentation and in general getting to the point very quickly with a minimum amount of hassle. Happy developers make better software. Even better when they needn't to fight with the toolchain. :)

Maemo 5 was the first one I picked since being Debian-based it seems to be the most open platform. I remember briefly using a Nokia N770 in 2006 and apparently Nokia thinks it's a product line worth upgrading by N810 and now N900 released in 2009. Unfortunately even with the backing of Nokia and several years of development, the documentation is not quite as organized as I'd like it to be, with all respect. From the main Maemo.org developer page, it takes five clicks through a Nokia site on another host, back to Maemo wiki, and to the cryptic installation notes that remind me of Gentoo manuals. Choosing those five clicks wasn't quite trivial either.

Thankfully some fellow Maemo developers kindly guided me to a hidden Nokia page hosting a prepared Ubuntu virtual image with the SDK and the rest of the tools. Apparently even hosted at nokia.com this is an unofficial image. I let the 1.7 GB image to download overnight and launched it in VirtualBox the next morning without a hitch. It brought up the Ubuntu desktop, with no assistance or an emulator icon around. Here be dragons indeed.. Spells and incantations will apparently be needed. Now, somewhere in the middle of the installation spellbook it says "Xephyr" needs to be started:

$ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb &

Mm-hm. This launches up an empty, gray X window. Now, the commands to start the "scratchbox environment" and inside it, the Maemo startup script:

$ setxkbmap fi
$ /scratchbox/login
> export DISPLAY=:2
> af-sb-init.sh start

Success! I still think I shouldn't need to know any of this, but it is running with a fair amount of work. Unfortunately none of the apps were installed and the virtual device seemed quite empty – all there was this Application Manager:

Some extra packages need to be manually installed into the scratchbox environment:

> apt-get install nokia-binaries nokia-apps

Then I had the Maemo browser, which displayed the page correctly. Happiness!

I wonder what Intel does to the SDK now after merging Moblin and Maemo to MeeGo...

Next, testing Google Android. The SDK is a ~20 MB zip file that is a Java GUI which downloads the actual SDK. The size after downloading platforms v1.6 and v2.1 is 343 MB.

Creating an Android virtual device was very easy with the GUI.

And it renders correctly on version 2.1!

Finally, since I work on OS X, I can also try out the iPhone SDK. It required a registration and another overnight download of the whopping 2.8 GB package that comes with bundled Xcode. After downloading, QuickSilver finds the simulator quite nicely and it looks sleek.

I have only a few times used a real iTouch device, but I see the appeal in their design. iPhone with its Safari browser can display my test page correctly.

Overall, considering these mobile SDKs, Apple provides the most elegant solution, Google being in the middle ground and (now-depracated) Maemo the worst experience. While these being developer tools, the user is expected to have some technical knowledge. This is only a very superficial evaluation, just from the perspective of a web developer who wanted to test how his page renders on these platforms. Speaking of the devices, personally I cannot justify their price to their capabilities just yet, but it is nice to evaluate them by their SDKs. Maemo/MeeGo has the Debian sex appeal for the better and the worse. I feel that Nexus One won't be the first really big model even being technologically superior to the iPhone..

No comments: