Archives for category: webOS

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 recover from the rough ride. It’s given me time to reboot and explore the mobile space from a fresh perspective. A few things have stayed the same (I still think Android is doing it very wrong and iOS isn’t doing it very right), but a few new things presented themselves. Namely, there is another fish in the sea which has a much better shot of pushing out amazing, web-friendly devices…

Monday is my first day at RIM. You know, the BlackBerry folks. Like Palm, RIM has received some negative press of late. Some layoffs and restructuring are looming, and some of the tech media are skeptical of RIM’s future. While some of that sounds familiar, here are just a few important differences to me:

1. While webOS fell behind the market leaders in HTML5 support, RIM has pushed forward. In fact, the early BlackBerry 10 (BB10) browser looks to be top dog. Today, HTML5 Test gives it a whopping score of 447. This is a higher score than iOS 5 (324), higher still than Android 4 (273), and even slightly higher than the top desktop browser score (Chrome Canary with 442). Source: http://html5test.com/results/mobile.html

2. RIM gets that web developers can and should be equal citizens with native developers. For the past two years, they’ve been steadily moving towards complete system access parity between c/c++, Adobe Air, and Java (Android flavor). In other words, they support more tools for developers to make great apps than anyone else in the mobile space today.

3. As a user, BB10 itself is damn awesome. It has some of goodies I liked from webOS, iOS and even Win7; but all streamlined and more functional. Plus, there are even more unique features and slick interactions which help put it way over the top in my book…. and it’s not even released yet. I haven’t been this excited about a mobile platform in a long while, and judging from meeting a ton of other excited developers at a BlackBerry 10 Jam, I’m not the only one.

I’m joining the BlackBerry Developer Evangelist team, with pretty much the same mission: get web developers into making great mobile HTML5 stuff (apps or otherwise). Now that I think about it, there is one other similarity to my job at Palm: great people. Everyone I’ve met at RIM so far has been top notch. And while I’ll miss working with my former webOS Developer Relations teammates (except for Joshua Granick, who moved to RIM as well), I’ll still see you all at HTML5 conferences, mobile meetups and, of course, BlackBerry developer events (c’mon, we all know you’re going to come and take a peek at BB10).

In short: farewell webOS Nation, and hello CrackBerry!

Advertisements

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’s webkit properly supports this CSS property in the future, your users will be dragging a shadowed version of the control around in ways you probably don’t want. Please be sure and test this with new SDK versions and be ready to take it out of your app at some point.

Twelve minutes of Jo, showing the same JavaScript web app code running on webOS, iPhone, iPad, Android, Symbian and… Dashboard widgets? Yup. First in a series of videos, this screencast is a quick intro to the cross-platform capabilities of this JavaScript framework (both for mobile apps with PhoneGap and mobile web apps). Followup videos will cover making your first Jo app, getting it running with PhoneGap, theming it with CSS and other goodies. Enjoy!

You can also read more about this open source project at joapp.com.

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 your app rotate along with the device orientation, switching from portrait to landscape as necessary. It’s a high-value one-liner call which should serve most orientation needs.

You can also specify a “locked” orientation with different strings in place of “free”. Options are: up (default portrait), down, left and right. So if you have a side-scroller game that would benefit from horizontal presentation, just use:

Read the rest of this entry »

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 (using a folder name of “hello” in this example) as index.html. This will become your app folder. You can test your app in Chrome or Safari by simply opening this file in your browser. Not terribly impressive, but hey, it’s a start.

Read the rest of this entry »