This is the project basedPalm Pre programming book. It talks about writing games, useful applications and it turns a journeyman web developer into a champion Palm Pre programmer. Any Javascript coder out for a bit of fun and profit will jump on the Palm, since it is the only mobile platform permitting Javascript coding.
Author(s): Frank Zammetti
Edition: 1
Year: 2009
Language: English
Pages: 400
Prelim......Page 1
Contents at a Glance......Page 6
Contents......Page 7
Foreword......Page 17
About the Author......Page 18
About the Technical Reviewer......Page 19
Acknowledgments......Page 20
Who This Book Is For......Page 21
An Overview of This Book......Page 22
Contacting the Author......Page 23
Part 1: Laying the Foundation......Page 25
Captain Kirk’s Communicator Never Looked So Quaint......Page 27
Unknown......Page 0
I Feel So Alone, an Island Among Many......Page 29
A Computer in the Palm (Ahem) of Your Hand......Page 31
The Times, They Are a-Changin’......Page 32
Apple Raises......Page 33
Of Course, There’s Got to Be a Downside......Page 34
Say Hello to My Little Friend: The Palm Pre......Page 35
From Hardware to Software: webOS......Page 36
The User Interface Is Where It’s At......Page 38
Multitasking and Activities......Page 39
Navigation and Gestures......Page 40
The Status Bar......Page 41
Alerting the User to Background Activity: The Dashboard......Page 42
Guiding Principles of webOS UI Design......Page 44
How Palm Got Its Mojo Back......Page 46
Mojo Standard Directory Structure......Page 47
Scenes (Views and Assistants)......Page 48
Application Life Cycle......Page 49
Getting Started with webOS Development......Page 52
A Proper IDE Makes Things a Lot Easier......Page 53
Why Break with Tradition? The HelloWorld Application......Page 54
Building a Better (Hello) World......Page 57
A Few Final Steps to Make This Work......Page 61
Summary......Page 66
The Mojo API......Page 67
Mojo.Animation......Page 70
Mojo.assert(s) and Mojo.require(s)......Page 71
Mojo.Controller......Page 74
Mojo.Controller.AppController......Page 76
Mojo.Controller.SceneController......Page 77
Mojo.Depot......Page 79
Mojo.Event......Page 81
Mojo.Format......Page 83
Mojo.Function/Mojo.Function.Synchronize......Page 84
Mojo.Log......Page 85
Mojo.Model......Page 86
Mojo.Model.Cookie......Page 87
Mojo.Transition......Page 88
Mojo.View......Page 89
Building a User Interface: Widgets......Page 90
Button......Page 92
ToggleButton......Page 93
RadioButton......Page 94
ListSelector......Page 95
TimePicker......Page 96
IntegerPicker......Page 97
List......Page 98
FilterField......Page 100
TextField......Page 101
PasswordField......Page 103
ProgressBar......Page 104
ProgressPill......Page 105
Spinner......Page 106
Slider......Page 107
Drawer......Page 108
ImageView......Page 109
WebView......Page 110
Menus......Page 111
Hey, Can I Get Some Service Around Here?......Page 113
Application Manager......Page 114
Alarms......Page 116
Audio......Page 117
Calendar......Page 118
Connection Manager......Page 119
Contacts......Page 120
GPS......Page 121
Maps......Page 122
Photos......Page 123
System Service......Page 124
Email......Page 125
Accelerometer......Page 126
Camera......Page 127
Summary......Page 128
Part 2: The Projects......Page 129
What Does This App Do Anyway?......Page 131
Planning the Application......Page 132
Creating the Skeleton......Page 134
Exploring the Data Model......Page 135
The sources.json File......Page 137
Global-Scope Code......Page 138
The CodeCabinet.js File......Page 139
The DAO.js File......Page 140
Initializing the DAO......Page 143
Retrieving Categories......Page 144
Deleting a Category......Page 145
Retrieving Snippets......Page 146
Deleting a Snippet......Page 148
Setting the Stage......Page 149
A Matter of Style......Page 152
The View HTML......Page 153
The Scene Assistant......Page 154
The View HTML......Page 155
The Scene Assistant......Page 156
The View HTML......Page 161
The Scene Assistant......Page 162
Snippet List Scene......Page 163
The Scene Assistant......Page 164
Snippet Details Scene......Page 165
The View HTML......Page 166
The Scene Assistant......Page 169
Search Scene......Page 177
The View HTML......Page 178
The Scene Assistant......Page 179
The View HTML......Page 180
The Scene Assistant......Page 181
The View HTML......Page 185
The Scene Assistant......Page 186
Summary......Page 188
What’s This App Do Anyway?......Page 189
AJAX......Page 191
The Trouble with AJAX......Page 192
The Yahoo! Search Service......Page 193
The Yahoo! Map Image Service......Page 195
Planning the Application......Page 196
Creating the Skeleton......Page 198
appinfo.json......Page 199
framework_config.json......Page 200
LocalBusinessSearch.js......Page 201
Opening the Depot......Page 202
Is the Internet Out There?!?......Page 204
Setting the Stage......Page 205
A Matter of Style......Page 208
Welcome Scene......Page 210
The Scene Assistant......Page 211
Dealing with Orientation Changes......Page 212
The View HTML......Page 215
The Scene Assistant......Page 218
Handling Commands......Page 221
Getting a GPS Fix......Page 222
Performing a Search......Page 224
Search Results Scene......Page 226
The Scene Assistant......Page 227
Handling Returned Search Results......Page 230
Handling User Selection of a Search Result......Page 232
The View HTML......Page 233
The Scene Assistant......Page 234
Activating and Deactivating the Scene......Page 237
Handling Commands......Page 239
Getting a Map Image......Page 242
Handling Orientation Changes......Page 243
Favorites Scene......Page 244
The View HTML......Page 246
The Scene Assistant......Page 247
Suggested Exercises......Page 249
Summary......Page 250
What’s This App Do Anyway?......Page 251
Planning the Application......Page 253
Creating the Skeleton......Page 254
The appinfo.json File......Page 256
The framework_config.json File......Page 257
A Matter of Style......Page 258
The View HTML......Page 259
The Scene Assistant......Page 262
The View HTML......Page 265
The Scene Assistant......Page 267
The View HTML......Page 292
The Scene Assistant......Page 293
Suggested Exercises......Page 295
Summary......Page 296
What’s This App Do Anyway?......Page 297
The RESTful Approach to Web Services......Page 298
Getting a List of Friends......Page 299
Planning the Application......Page 300
Creating the Skeleton......Page 302
The sources.json File......Page 303
Global-Scope Code......Page 304
A Matter of Style......Page 305
A Couple of Data Fields......Page 306
Handling Launch......Page 307
Main Scene......Page 308
The View HTML......Page 309
The Scene Assistant......Page 310
The View HTML......Page 316
The Scene Assistant......Page 318
Summary......Page 329
What’s This App Do Anyway?......Page 331
Google App Engine: Life in the Cloud(s) Is Good!......Page 333
Getting Started with GAE......Page 335
Defining the API: Let’s Take a REST......Page 339
One DTO As an Example: Project......Page 340
Defining Responses: OkResponse and ErrorResponse......Page 342
Some Utilities to Make Life Easier......Page 343
Handling Requests: ProjectServlet......Page 344
Creating and/or Updating a Project......Page 346
Retrieving Project(s)......Page 350
Deleting a Project......Page 351
A Little Bit of Configuration......Page 352
Planning the Application......Page 353
The Data Model......Page 355
The DAO.js File......Page 357
Initializing the DAO......Page 359
Creating an Entity......Page 360
Retrieving Entities......Page 362
Deleting an Entity......Page 365
The TimeTracker.js File......Page 366
A Matter of Style......Page 369
The View HTML......Page 371
The Scene Assistant......Page 372
Welcome Scene......Page 373
The Scene Assistant......Page 374
Log In Dialog Scene......Page 375
The View HTML......Page 376
The Scene Assistant......Page 377
Project Administration Scene......Page 380
The Scene Assistant......Page 381
Project Details Scene......Page 383
The View HTML......Page 384
The Scene Assistant......Page 385
Task Details Scene......Page 391
The Scene Assistant......Page 392
Resource Details Scene......Page 394
The View HTML......Page 396
The Scene Assistant......Page 397
The View HTML......Page 401
The Scene Assistant......Page 402
The View HTML......Page 406
The Scene Assistant......Page 407
Task Summary and Resource Summary Scenes......Page 409
Suggested Exercises......Page 410
Summary......Page 411
Index......Page 413