Tuesday, February 17th, 2009

webOS and Mojo framework for Palm Pre; Finally get some info

Category: Mobile

Fancy writting a Web application on the architecture above? Since announcing the Palm Pre we have seen a lot of people wondering about the goods under the hood. We now have an online reference to check out.

Once you get past the high level stuff, you get to the meat:

Stages and Scenes

Palm’s user experience architecture provides for a greater degree of application scope than is normally considered in a web application. To support this and specific functions of the framework, Palm has introduced a structure for webOS applications built around stages and scenes.

A stage is a declarative HTML structure similar to a conventional HTML window or browser tab. Palm webOS applications can have one or more stages, but typically the primary stage will correspond to the application’s card. Other stages might include a dashboard, or other cards associated with different activities within the application. You should refer back to the earlier example of the Email application where the main card held the Email inbox and another card held a draft Email. Each email card is a separate stage, but part of the same application.

Scenes are mutually exclusive views of the application within a Stage. Most applications will provide a number of different kinds of scenes within the same stage, but some very simple applications (such as Calculator) will have just a single scene. An application must have at least one scene, supported by a controller, a JavaScript object referred to as a scene assistant, and a scene view, a segment of HTML representing the layout of the scene.

Application Lifecycle

Palm webOS applications are required to use directory and file structure conventions to enable the framework to run the applications without complex configuration files. At the top level the application must have an appinfo.json object, providing the framework with the essential information needed to install and load the app. In addition, all applications will have an index.html file, an icon.png for application’s Launcher icon, and an app folder, which provides a directory structure for assistants and views.

By convention, if the app has images, other javascript or application-specific CSS, then these should be contained in folders named images, javascripts, and stylesheets respectively. This is not required but makes it simpler to understand the application’s structure.

Launching a webOS application starts with loading the index.html file and any referenced stylesheets and javascript files, as would be done with any web application or web page. However, the framework intervenes after the loading operations and invokes the stage and scene assistants to perform the application’s setup functions and to activate the first scene. From this point, the application would be driven either by user actions or dynamic data.


  • Storage: HTML5 storage is natively accessible
  • Widgets: Can look like this:
    1. <div x-mojo-element="ToggleButton" id="my-toggle"></div>
  • Services: The architecture looks like this:
  • Developer Tools: SDK comes with emulator and command line tools

Still looking forward to more details, examples, and such…. but exciting to see the data coming out!

Posted by Dion Almaer at 12:53 am

3.7 rating from 23 votes


Comments feed TrackBack URI

Can’t wait to start poking it around, Its also nice to know that the palm pre will support flash :)

Comment by V1 — February 17, 2009

Can’t wait. It’s a great looking phone.

Comment by kim3er — February 17, 2009

To join the Mojo Framework SDK Developer’s Network Community go to http://www.mojodn.com and contribute. This is an important start to the webOS and Mojo community, and especially for Palm.

Comment by mojoDN — April 4, 2009

Leave a comment

You must be logged in to post a comment.