Practical Palm Pre webOS Projects (eBook)
400 Seiten
Apress (Verlag)
978-1-4302-2675-8 (ISBN)
The Palm Pre is the hottest new device on the block. It's the cell phone-nay, personal digital everything-that all the cool kids want to get their hands on...but no one wants to use it more than developers!
The Palm Pre is more than just a way-cool device, though: it is built on Palm's webOS, an operating system that changes the game for developers. Building on standards-based web technologies, webOS allows us to create applications more quickly and easily than any other platform out there using the same technologies we know and love already. It turns out to be quite fun, too!
In this book, you'll learn all about the Palm Pre and webOS, their capabilities, and how to develop for them. You'll learn to write applications that function entirely on the Pre itself, and you'll also learn to write applications that 'live in the cloud' (i.e., keep you connected to the digital world around you). You'll spend most of your time looking at Mojo, the framework API through which your code interfaces with the operating system. All of this will be presented within the context of six fully functional real-world applications that you can use on your own Pre!
Once you're done, you'll be ready to write your own webOS applications for the Pre, get them into the app catalog (the online store where Pre applications are made available to Pre owners), and make tons of cash.
- Learn to program the Palm Pre by sticking to JavaScript.
- Write useful apps as well as games.
- Become productive using Mojo and upload new applications within a day.
Frank W. Zammetti is a web architect specialist for a leading worldwide financial company by day, and a PocketPC and open-source developer by night. He is the founder and chief software architect of Omnytex Technologies, a PocketPC development house.He has over 12 years of 'professional' experience in the information technology field, and over 12 more of 'amateur' experience. He began his nearly life-long love of computers at age 7, when he became one of four students chosen to take part in his school district's pilot computer program. A year later, he was the only participant left! The first computer Frank owned was a Timex Sinclair 1000 in 1982, on which he wrote a program to look up movie times for all of Long Island (and without the 16k expansion module!). After that, he moved on to a Commodore 64 and spent about 4 years doing nothing but assembly programming (games mostly). He finally got his first IBM-compatible PC in 1987, and began learning the finer points of programming (as they existed at that time!).Frank has primarily developed web-based applications for about 8 years. Before that, he developed Windows-based client/server applications in a variety of languages. Frank holds numerous certifications including SCJP, MCSD, CNA, i-Net+, A+, CIW, MCP, and numerous BrainBench certifications. He is a contributor to a number of open source projects, including DataVision, Struts, PocketFrog, and Jakarta Commons. In addition, Frank has started two projects: Java Web Parts and The Struts Web Services Enablement Project. He also was one of the founding members of a project that created the first fully functioning Commodore 64 emulator for PocketPC devices (PocketHobbit).Frank has authored various articles on topics that range from integrating DataVision into web apps, to using Ajax in Struts-based applications. He is working on a new application framework specifically geared to creating next-generation web applications.
The Palm Pre is the hottest new device on the block. It's the cell phone-nay, personal digital everything-that all the cool kids want to get their hands on...but no one wants to use it more than developers!The Palm Pre is more than just a way-cool device, though: it is built on Palm's webOS, an operating system that changes the game for developers. Building on standards-based web technologies, webOS allows us to create applications more quickly and easily than any other platform out there using the same technologies we know and love already. It turns out to be quite fun, too!In this book, you'll learn all about the Palm Pre and webOS, their capabilities, and how to develop for them. You'll learn to write applications that function entirely on the Pre itself, and you'll also learn to write applications that live in the cloud (i.e., keep you connected to the digital world around you). You'll spend most of your time looking at Mojo, the framework API through which your code interfaces with the operating system. All of this will be presented within the context of six fully functional real-world applications that you can use on your own Pre!Once you're done, you'll be ready to write your own webOS applications for the Pre, get them into the app catalog (the online store where Pre applications are made available to Pre owners), and make tons of cash. Learn to program the Palm Pre by sticking to JavaScript. Write useful apps as well as games. Become productive using Mojo and upload new applications within a day.
Frank W. Zammetti is a web architect specialist for a leading worldwide financial company by day, and a PocketPC and open-source developer by night. He is the founder and chief software architect of Omnytex Technologies, a PocketPC development house.He has over 12 years of "professional" experience in the information technology field, and over 12 more of "amateur" experience. He began his nearly life-long love of computers at age 7, when he became one of four students chosen to take part in his school district's pilot computer program. A year later, he was the only participant left! The first computer Frank owned was a Timex Sinclair 1000 in 1982, on which he wrote a program to look up movie times for all of Long Island (and without the 16k expansion module!). After that, he moved on to a Commodore 64 and spent about 4 years doing nothing but assembly programming (games mostly). He finally got his first IBM-compatible PC in 1987, and began learning the finer points of programming (as they existed at that time!).Frank has primarily developed web-based applications for about 8 years. Before that, he developed Windows-based client/server applications in a variety of languages. Frank holds numerous certifications including SCJP, MCSD, CNA, i-Net+, A+, CIW, MCP, and numerous BrainBench certifications. He is a contributor to a number of open source projects, including DataVision, Struts, PocketFrog, and Jakarta Commons. In addition, Frank has started two projects: Java Web Parts and The Struts Web Services Enablement Project. He also was one of the founding members of a project that created the first fully functioning Commodore 64 emulator for PocketPC devices (PocketHobbit).Frank has authored various articles on topics that range from integrating DataVision into web apps, to using Ajax in Struts-based applications. He is working on a new application framework specifically geared to creating next-generation web applications.
Contents at a Glance 5
Table of Contents 6
Foreword 16
About the Author 17
About the Technical Reviewer 18
Acknowledgments 19
Introduction 20
Who This Book Is For 20
An Overview of This Book 21
Obtaining Source Code 22
Obtaining Updates 22
Contacting the Author 22
PART 1 Laying the Foundation 23
CHAPTER 1 The New Kid(s) on the Block 24
Captain Kirk’s Communicator Never Looked So Quaint 24
I Feel So Alone, an Island Among Many 26
A Computer in the Palm (Ahem) of Your Hand 28
The Times, They Are a-Changin’ 29
Apple Raises 30
Of Course, There’s Got to Be a Downside 31
Back with a Vengeance: Palm Calls 32
Say Hello to My Little Friend: The Palm Pre 32
From Hardware to Software: webOS 33
The User Interface Is Where It’s At 35
Multitasking and Activities 36
The Card View 37
Navigation and Gestures 37
The Launcher 38
The Status Bar 38
Alerting the User to Background Activity: The Dashboard 39
Local Storage Facilities 41
Guiding Principles of webOS UI Design 41
How Palm Got Its Mojo Back 43
Mojo Standard Directory Structure 44
Stages 45
Scenes (Views and Assistants) 45
The Scene Stack 46
Application Life Cycle 46
Getting Started with webOS Development 49
A Proper IDE Makes Things a Lot Easier 50
Why Break with Tradition? The HelloWorld Application 51
Building a Better (Hello) World 54
A Few Final Steps to Make This Work 58
Summary 63
CHAPTER 2 The Four, er, Three Horsemen of the Apocalypse 64
The Mojo API 64
Mojo.Animation 67
Mojo.assert(s) and Mojo.require(s) 68
Mojo.Char 71
Mojo.Controller 71
Mojo.Controller.AppController 73
Mojo.Controller.StageController 74
Mojo.Controller.SceneController 74
Mojo.Depot 76
Mojo.Event 78
Mojo.Format 80
Mojo.Function/Mojo.Function.Synchronize 81
Mojo.Log 82
Mojo.Model 83
Mojo.Model.Cookie 84
Mojo.Service 85
Mojo.Transition 85
Mojo.View 86
Mojo.Widget 87
Building a User Interface: Widgets 87
Button 89
CheckBox 90
ToggleButton 90
RadioButton 91
ListSelector 92
DatePicker 93
TimePicker 93
IntegerPicker 94
List 95
FilterField 97
FilterList 98
TextField 98
PasswordField 100
RichTextEdit 101
ProgressBar 101
ProgressPill 102
Spinner 103
Slider 104
Drawer 105
ImageView 106
WebView 107
Menus 108
Hey, Can I Get Some Service Around Here? 110
Application Manager 111
Accounts 113
Alarms 113
Audio 114
Browser 115
Calendar 115
Connection Manager 116
Contacts 117
Document Viewers 118
GPS 118
Maps 119
Messaging 120
Phone 120
Photos 120
System Properties 121
System Service 121
System Sounds 122
Video 122
View File 122
Email 122
Accelerometer 123
Camera 124
Mojo Messaging Service 125
Summary 125
PART 2 The Projects 126
CHAPTER 3 A Place for Your Stuff: Code Cabinet 127
What Does This App Do Anyway? 127
Planning the Application 128
Creating the Skeleton 130
Exploring the Data Model 131
Configuring the Application 133
The appinfo.json File 133
The sources.json File 133
The framework_config.json File 134
Global-Scope Code 134
The CodeCabinet.js File 135
The DAO.js File 136
Initializing the DAO 139
Creating a Category 140
Retrieving Categories 140
Deleting a Category 141
Creating a Snippet 142
Retrieving Snippets 142
Updating a Snippet 144
Deleting a Snippet 144
Handling Errors 145
Setting the Stage 145
A Matter of Style 148
A Scene-by-Scene Account 149
Welcome Scene 149
The View HTML 149
The Scene Assistant 150
Category List Scene 151
The View HTML 151
The Scene Assistant 152
Category Add Scene 157
The View HTML 157
The Scene Assistant 158
Snippet List Scene 159
The View HTML 160
The Scene Assistant 160
Snippet Details Scene 161
The View HTML 162
The Scene Assistant 165
Search Scene 173
The View HTML 174
The Scene Assistant 175
Search Results Scene 176
The View HTML 176
The Scene Assistant 177
Preferences Scene 181
The View HTML 181
The Scene Assistant 182
Suggested Exercises 184
Summary 184
CHAPTER 4 A Gateway to Industry: Local Business Search 185
What’s This App Do Anyway? 185
AJAX 187
The Trouble with AJAX 188
Meet the Yahoo! Web Services 189
The Yahoo! Search Service 189
The Yahoo! Map Image Service 191
Planning the Application 192
Creating the Skeleton 194
The Data Model 195
Application Configuration 195
appinfo.json 195
sources.json 196
framework_config.json 196
Global-Scope Code 197
LocalBusinessSearch.js 197
Opening the Depot 198
Is the Internet Out There?!? 200
Setting the Stage 201
A Matter of Style 204
A Scene-by-Scene Account 206
Welcome Scene 206
The View HTML 207
The Scene Assistant 207
Dealing with Orientation Changes 208
Search Scene 211
The View HTML 211
The Scene Assistant 214
Handling Commands 217
Getting a GPS Fix 218
Clearing the Search Fields 220
Performing a Search 220
Search Results Scene 222
The View HTML 223
The Scene Assistant 223
Handling Returned Search Results 226
Handling User Selection of a Search Result 228
Item Details Scene 229
The View HTML 229
The Scene Assistant 230
Activating and Deactivating the Scene 233
Handling Commands 235
Getting a Map Image 238
Handling Orientation Changes 239
Favorites Scene 240
Preferences Scene 242
The View HTML 242
The Scene Assistant 243
Suggested Exercises 245
Summary 246
CHAPTER 5 Time for a Break: Engineer, a webOS Game 247
What’s This App Do Anyway? 247
Planning the Application 249
Creating the Skeleton 250
The Data Model 252
Application Configuration 252
The appinfo.json File 252
The sources.json File 253
The framework_config.json File 253
Global-Scope Code 254
Setting the Stage 254
A Matter of Style 254
A Scene-by-Scene Account 255
titleScreen Scene 255
The View HTML 255
The Scene Assistant 258
Game Screen Scene 261
The View HTML 261
The Scene Assistant 263
Setting Up the Scene 268
Activating the Scene 270
Starting a New Game 273
Playing a Sound (and Avoiding Redundant Code!) 276
The Main Game Loop 277
Drawing the Frame and Flashing the Lights 277
Drawing the Control Console and Hands 278
Drawing the Game-Play Area 279
The Main Game Logic (As Implemented for Each Particle) 279
Changing a Particle’s Direction 283
Heating Up the Engine 284
Updating the Players’ Score 285
Handling Player Input 286
Game Over Dialog Box 288
The View HTML 288
The Scene Assistant 289
Suggested Exercises 291
Summary 292
CHAPTER 6 Keeping an Eye on Friends: Twitter Monitor 293
What’s This App Do Anyway? 293
Meet the Twitter Web Services 294
The RESTful Approach to Web Services 294
Verifying a User 295
Getting a List of Friends 295
Getting the Most Current Status of a Specific User 296
Planning the Application 296
Creating the Skeleton 298
The Data Model 299
Application Configuration 299
The appinfo.json File 299
The sources.json File 299
The framework_config.json File 300
Global-Scope Code 300
Setting the Stage 301
A Matter of Style 301
A New Kind of Helper: The Application Assistant 302
A Couple of Data Fields 302
Handling Launch 303
A Scene-by-Scene Account 304
Main Scene 304
The View HTML 305
The Scene Assistant 306
Setting Up the Scene 306
Activating the Scene 308
Getting to the Heart of the Matter: Monitoring Feeds 309
Settings Scene 312
The View HTML 312
The Scene Assistant 314
Setting Up the Scene 314
The List Template 318
Cleaning Up After Ourselves 319
Getting Friends List from Twitter, Part I 320
Verifying the Twitter Account 321
Getting Friends List from Twitter Part II: The Sequel! 322
Saving Changes 323
Handling Application Menu Commands 324
Suggested Exercises 325
Summary 325
CHAPTER 7 Project Management for All: Time Tracker 326
What’s This App Do Anyway? 326
Google App Engine: Life in the Cloud(s) Is Good! 328
Getting Started with GAE 330
Defining the API: Let’s Take a REST 334
The Server-Side Code 335
One DTO As an Example: Project 335
Defining Responses: OkResponse and ErrorResponse 337
Some Utilities to Make Life Easier 338
Handling Requests: ProjectServlet 339
Creating and/or Updating a Project 341
Retrieving Project(s) 345
Deleting a Project 346
Tasks and Resources 347
A Little Bit of Configuration 347
Planning the Application 348
Creating the Skeleton 350
The Data Model 350
Application Configuration 352
Global-Scope Code 352
The DAO.js File 352
Initializing the DAO 354
Creating an Entity 355
Retrieving Entities 357
Updating an Entity 360
Deleting an Entity 360
The TimeTracker.js File 361
Setting the Stage 364
A Matter of Style 364
A Scene-by-Scene Account 366
Title Scene 366
The View HTML 366
The Scene Assistant 367
Welcome Scene 368
The View HTML 369
The Scene Assistant 369
Log In Dialog Scene 370
The View HTML 371
The Scene Assistant 372
Project Administration Scene 375
The View HTML 376
The Scene Assistant 376
Project Details Scene 378
The View HTML 379
The Scene Assistant 380
Task Details Scene 386
The View HTML 387
The Scene Assistant 387
Resource Administration Scene 389
Resource Details Scene 389
Book Time Scene 391
The View HTML 391
The Scene Assistant 392
Summaries Scene 396
The View HTML 396
The Scene Assistant 397
Project Summary Scene 401
The View HTML 401
The Scene Assistant 402
Task Summary and Resource Summary Scenes 404
Suggested Exercises 405
Summary 406
Index 407
Erscheint lt. Verlag | 27.5.2010 |
---|---|
Zusatzinfo | 400 p. |
Verlagsort | Berkeley |
Sprache | englisch |
Themenwelt | Mathematik / Informatik ► Informatik ► Netzwerke |
Informatik ► Software Entwicklung ► Mobile- / App-Entwicklung | |
Mathematik / Informatik ► Informatik ► Theorie / Studium | |
Mathematik / Informatik ► Informatik ► Web / Internet | |
Informatik ► Weitere Themen ► Smartphones / Tablets | |
Schlagworte | Apps • Games • Java • Management • programming • Technology • Time |
ISBN-10 | 1-4302-2675-7 / 1430226757 |
ISBN-13 | 978-1-4302-2675-8 / 9781430226758 |
Haben Sie eine Frage zum Produkt? |
Größe: 4,0 MB
DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasserzeichen und ist damit für Sie personalisiert. Bei einer missbräuchlichen Weitergabe des eBooks an Dritte ist eine Rückverfolgung an die Quelle möglich.
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.
Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich