Facebook in your Palm; Fun building the new Facebook app Finally. The perfect iPad stand.
Mar 09

palm-run: a walk through of building a new webOS application

Palm, Tech, webOS Add comments

As developers, we often build scripts and tools to sharpen our workflow. One of the simple scripts that I am refining is palm-run, my swiss-army knive of a tool that deals with packaging, installing, launching, and tailing logs as I develop my application.

I put together a walk through of palm-run in the context of creating a new webOS application from scratch. In the screencast below I cover:

  • Generating your webOS application structure
  • Implementing a one-scene application
  • Packaging the application and running it in the emulator
  • Running an IPK directly, no packaging here mate-y
  • Setting up your application for development and production uses (more below)
  • Using the Palm Inspector to take a peak at the structure of your app as it runs

(I recommend going full screen on this bad boy to help read the deets.)

Development vs. Production

I wanted to go into a bit of detail on this one. When you build an app you want to have different builds for development and production. In development, you want debugging turned on with verbose output. In production, you want to exclude all but the necessary files.

The latest version of palm-run lets you tell it that you fancy production mode via -P.

You can enhance your webOS application to do more in this world by doing the following:

  • Create a config directory at the app root
  • Create framework config files for the two use cases. Here are two common versions:

    Development

    {
        "logLevel": 99,
        "debuggingEnabled": true,
        "timingEnabled": false,
        "logEvents": false
    }

    Production

    {
        "logLevel": 0,
        "debuggingEnabled": false,
        "timingEnabled": false,
        "logEvents": false
    }
  • Create exclude files for the two use cases (excludes_development.txt and excludes_production.txt)

Now you are set. To see a shell app that uses this, check out palmrun-configtest. If you build the app you will see that there isn’t console output if you palm-run with the -P option.

What else would you want a high level program like this to do for you?

2 Responses to “palm-run: a walk through of building a new webOS application”

  1. Arunabh das Says:

    This is beautiful. Is palm-run a shell script? – Arunabh Das

  2. Veritea Says:

    Very nice, but unfortunately it is useless for Windows users (it is a SH script).

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: What are the first four letters in the word British?