Now that the Palm Pre SDK is out, what do you need to develop for this phone?

I would like to know what languages ​​and tools (debuggers, IDEs, profilers, libraries, etc.) are available for those who want to develop for Palm Pre.

In addition, I would like to know what technological limitations exist that you need to know about.

+6
palm-pre
source share
3 answers

There is a library of JavaScript functions for interacting with the base system (material at the phone level) and CSS tags, styles, etc. for rendering in the style of Palm webOS.

The SDK comes with a palm-generate script that creates a set of configuration files and folder structures. The "Palm-package" script builds the isntaller, and the nother script, "palm-install" loads the installer into the emulator's file system (or a real palm, I think ... mine is custom and should be here Monday !!!).

It is easy enough to find this code, and it is not at all original, but I thought it would be useful to see here ...

Hello World - copied from a tutorial in palm webos sdk

alt text http://i29.tinypic.com/mttkiw.jpg

HelloWorld / appinfo.json - meta information for this application, including a unique name (domain style) and the root of the application ("index.html")

{ "id": "com.yourdomain.hello", "title": "Hello World", "type": "web", "main": "index.html", "icon": "icon.png", "version": "1.0.0", "vendor": "Your Company" } 

HelloWorld / sources.json - manifest

 [ { "source": "app\/assistants\/stage-assistant.js" }, { "source": "app\/assistants\/first-assistant.js", "scenes": "first" } ] 

helloWorld / app / assistantants / stage-assistant.js - controller for the application. each application consists of a stage with several scenes; the StageAssistant.setup () method starts first, providing time for initializing data, connections, etc.

 function StageAssistant () { } StageAssistant.prototype.setup = function() { this.controller.pushScene('first'); } 

HelloWorld / index.html - view for the stage

 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPECTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Hello, World!</title> <script src="/usr/palm/frameworks/mojo/mojo.js" type="text/javascript" x-mojo-version="1"></script> </head> <body> Hello, World! 2:59 </body> </html> 

helloWorld / app / assistantants / first-assistant.js - view for the "first" scene

 <div id="main" class="palm-hasheader"> <div class="palm-header">Header</div> <div id="count" class="palm-body-text">count</div> <div id="MyButton" name="MyButton1" x-mojo-element="Button"></div> </div> 

helloWorld / app / assistantants / first-assistant.js - controller for the "first" scene

 function FirstAssistant() { /* this is the creator function for your scene assistant object. It will be passed all the additional parameters (after the scene name) that were passed to pushScene. The reference to the scene controller (this.controller) has not be established yet, so any initialization that needs the scene controller should be done in the setup function below. */ } FirstAssistant.prototype.handleButtonPress = function(event){ // increment the total and update the display this.total++; this.controller.get('count').update(this.total); } FirstAssistant.prototype.setup = function() { /* this function is for setup tasks that have to happen when the scene is first created */ /* use Mojo.View.render to render view templates and add them to the scene, if needed. */ /* setup widgets here */ /* add event handlers to listen to events from widgets */ // set the initial total and display it this.total=0; this.controller.get('count').update(this.total); // a local object for button attributes this.buttonAttributes = {}; // a local object for button model this.buttonModel = { buttonLabel : 'TAP HERE', buttonClass : '', disabled : false }; // set up the button this.controller.setupWidget("MyButton", this.buttonAttributes, this.buttonModel); // bind the button to its handler Mojo.Event.listen(this.controller.get('MyButton'), Mojo.Event.tap, this.handleButtonPress.bind(this)); } FirstAssistant.prototype.activate = function(event) { /* put in event handlers here that should only be in effect when this scene is active. For example, key handlers that are observing the document */ } FirstAssistant.prototype.deactivate = function(event) { /* remove any event handlers you added in activate and do any other cleanup that should happen before this scene is popped or another scene is pushed on top */ } FirstAssistant.prototype.cleanup = function(event) { /* this function should do any cleanup needed before the scene is destroyed as a result of being popped off the scene stack */ this.controller.stopListening(this.controller.get('MyButton'), Mojo.Event.tap, this.handleButtonPress.bind(this)); } 
+3
source share

Its very similar to building web applications, but you need to download the webOS SDK from http://developer.palm.com/ and the palm emulator.

All the information is there and it’s easy to get it if you use the Eclipse IDE

+2
source share

It is a web-based OS, so I would suggest that it is somewhat similar to PhoneGap development, if you are familiar with their framework at all.

Javascript with custom API calls will manage most applications, and it looks like they are tweaking their SDK to work well with the Eclipse IDE. Of course, HTML and CSS will cover the cutting edge of things.

A good beginner page explaining what you are looking for can be found here: http://developer.palm.com/index.php?option=com_content&view=article&id=1603

+1
source share

All Articles