Palm Pre 向けに開発したい人が利用できる言語とツール (デバッガー、IDE、プロファイラー、ライブラリーなど) を知りたいです。
また、注意しなければならない技術的な制約があれば教えてください。
Palm Pre 向けに開発したい人が利用できる言語とツール (デバッガー、IDE、プロファイラー、ライブラリーなど) を知りたいです。
また、注意しなければならない技術的な制約があれば教えてください。
ベース システム (電話レベルのもの) と対話するための JavaScript 関数のライブラリと、Palm WebOS スタイルでレンダリングするための CSS タグ、スタイルなどがあります。
SDK には、一連の構成ファイルとフォルダー構造を構築するスクリプト "palm-generate" が付属しています。「palm-package」スクリプトは isntaller を構築し、別のスクリプト「palm-install」はインストーラーをエミュレーターのファイル システム (または本物の Palm、私は信じています...私のものは注文済みで、月曜日にここにあるはずです!!) にロードします。 !)。
このコードを見つけるのは簡単で、まったくオリジナルではありませんが、ここで垣間見ることは価値があると思いました...
HelloWorld/appinfo.json - 一意の名前 (ドメイン スタイル) とアプリケーションのルート ("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 - マニフェスト
[
{
"source": "app\/assistants\/stage-assistant.js"
},
{
"source": "app\/assistants\/first-assistant.js",
"scenes": "first"
}
]
helloWorld/app/assistants/stage-assistant.js - アプリケーションのコントローラー。各アプリケーションは、複数のシーンを持つステージで構成されています。StageAssistant.setup() メソッドが最初に制御を取得し、データや接続などを初期化する時間を提供します。
function StageAssistant () {
}
StageAssistant.prototype.setup = function() {
this.controller.pushScene('first');
}
HelloWorld/index.html - ステージのビュー
<?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/assistants/first-assistant.js - 「最初の」シーンのビュー
<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/assistants/first-assistant.js - 「最初の」シーンのコントローラー
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));
}
Webアプリケーションの作成と非常によく似ていますが、http://developer.palm.com/からwebOSSDKとpalmエミュレーターをダウンロードする必要があります。
すべての情報がそこにあり、EclipseIDEを使用すれば簡単に始めることができます
これはWebベースのOSであるため、そのフレームワークに精通している場合は、PhoneGap開発を行うのと多少似ていると思います。
カスタムAPI呼び出しを使用したJavascriptは、ほとんどのアプリケーションを駆動し、EclipseIDEで正常に動作するようにSDKを構成しているように見えます。もちろん、HTMLとCSSは物事のフロントエンドをカバーします。
あなたが探しているものを説明する良い初心者ページはここで見つけることができます:http ://developer.palm.com/index.php?option = com_content&view = article&id = 1603