HelloWorld.html as a webOS Application

Yesterday I had the privilege of meeting a lot of developers at the webOS CONNECT event in Paris, and though many were familiar with webOS, a few were new to the platform and wanted to know how difficult it was to create a new application.

How easy can we make it?

HelloWorld.html

<!doctype html>
<html>
<head>
	<title>Hello World</title>
</head>
<body>
	<div>Hello World!</div>
	<script type="text/javascript">
		if (window.PalmSystem) {
			PalmSystem.stageReady ();
		}
	</script>
</body>
</html>

appinfo.json

{
	"id": "com.palm.example.sdk.helloworld",
	"version": "1.0.0",
	"vendor": "HP",
	"type": "web",
	"main": "HelloWorld.html",
	"title": "Hello World",
	"icon": "icon.png",
	"uiRevision": 2
}

run.sh

palm-package Source
palm-install com.palm.example.sdk.helloworld_1.0.0_all.ipk
palm-launch com.palm.example.sdk.helloworld

You can use existing code really easily, it turns out. You just need to add the extra call to PalmSystem to tell it your application is finished loading. If I wanted a scroller or more features, it wouldn’t be hard to put my content inside of an Enyo application, or perhaps I could use another mobile Javascript framework.

http://www.joshuagranick.com/code/webos/Hello%20World.zip

Do you think I will have any takers if I sell this on the App Catalog?

  • Aartback Romero

    hello, sorry friend, how I can run it from the emulator? good blog thanks