Leaving webOS, but not the Web

While at Palm and HP, I made it my mission to evangelize HTML5 app development both inside and outside our company. The very core of the webOS value proposition was the web. In webOS, mobile websites, native and web-based apps lived together in a “zen-like” harmony.

At least, that was the theory. In my two years there, I watched webOS slip from a leader in mobile web to a distant follower. I won’t elaborate much on the internal hows and whys (frankly, I doubt I even have the full story anyway), but the simple fact was I had a dramatic drop in confidence in our ability to stay relevant. All the drama in the news didn’t help, and neither did the mighty layoff hammer which eventually swung down on myself and more than half of the remaining staff.

I’ve had a couple months to relax, decompress, and

Continue...

Tip: faster mousemove events in webOS 1.4.5

Warning: this is a short-term solution, it may cause interesting results in future versions of the webOS SDK, so use wisely.

One minor frustration I’ve run into with making JavaScript webOS apps (games in particular) is the mousemove events don’t seem to fire very often on custom controls. This is particularly noticeable when users finger-paint on canvas tags or drag elements around. I suspect that this quirk in the webOS webkit was introduced as a performance improvement, but running up against it can be painful.

A fix I’ve discovered is this simple CSS addition to any elements which need higher resolution mouse movement (er, touch movement, whichever):

myelement {  
    -webkit-user-drag: element;
}

Just put any valid CSS selector in place of “myelement” above, and you should notice a marked improvement in mouse movement precision for the element(s) in question.

This is not a future-proof solution, because if Palm

Continue...

Jo and webOS part 2: window orientation and full screen

The last post revealed how a simple call to PalmSystem from your JavaScript code opens the door for you to take a stock web app with your favorite framework and turn it into a simple webOS app without having the overhead (or the wealth of cool features, in the interest of fairness) of Mojo.

Continuing with my explorations in the webOS 1.4.5 SDK, I’ve picked out a couple of other useful calls to the PalmSystem object. Both can be added to the “hello world” example I started in part one, and they’re really quick.

Free-wheeling orientation

A common requirement for mobile apps is the ability to respond to device orientation. I’m still digging around to see where you can hook into these events, but in the meantime here’s a simple call which is quite useful:

window.PalmSystem.setWindowOrientation('free');  

This tells webOS to let

Continue...

Jo and webOS: bypassing Mojo

One neat discovery I found in the webOS 1.4.5 SDK is that it is possible to have a simple app which doesn’t use Mojo. Why would you want to? Load time! Mojo brings a lot to the table, but if you want to use your own favorite JavaScript framework, much of that ends up being overhead and increases your app’s load time.

Step one: Make a web app and test it in Chrome or Safari.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"  
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">  
<head>  
    <title>Hello</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>  
<body>  
    <h1>Hello World!</h1>
</body>  
</html>  

Save this into a new folder

Continue...

Palm Developer Day Recap

I’m a big fan of Palm’s webOS. It’s based on open web standards, and Palm is doing everything I was expecting Apple to do with their iPhone when it was released (you may remember Steve Jobs saying “the web is the SDK”). Palm’s new OS is top notch, easy to develop for, and the developer relations folks are hard working and are very responsive.

It wasn’t a tough decision to go to their recent Developer Day conference, and right before I was about to shell out my $25 (seriously, only $25 for a conference, what a steal) I got a ping from Greg Vena, Dion Almaer and Ben Galbraith asking if I’d like to give a talk for the conference on Canvas, CSS and any other HTML5 graphics goodies I wanted to cover. Free registration? A chance to bend the ears of Palm’s

Continue...