E-Book, Englisch, 400 Seiten
Zammetti Practical Palm Pre webOS Projects
1. ed
ISBN: 978-1-4302-2675-8
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
E-Book, Englisch, 400 Seiten
ISBN: 978-1-4302-2675-8
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
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.
Autoren/Hrsg.
Weitere Infos & Material
1;Contents at a Glance;5
2;Table of Contents;6
3;Foreword;16
4;About the Author;17
5;About the Technical Reviewer;18
6;Acknowledgments;19
7;Introduction;20
7.1;Who This Book Is For;20
7.2;An Overview of This Book;21
7.3;Obtaining Source Code;22
7.4;Obtaining Updates;22
7.5;Contacting the Author;22
8;PART 1 Laying the Foundation;23
8.1;CHAPTER 1 The New Kid(s) on the Block;24
8.1.1;Captain Kirk’s Communicator Never Looked So Quaint;24
8.1.2;I Feel So Alone, an Island Among Many;26
8.1.3;A Computer in the Palm (Ahem) of Your Hand;28
8.1.3.1;The Times, They Are a-Changin’;29
8.1.3.2;Apple Raises;30
8.1.3.3;Of Course, There’s Got to Be a Downside;31
8.1.4;Back with a Vengeance: Palm Calls;32
8.1.4.1;Say Hello to My Little Friend: The Palm Pre;32
8.1.5;From Hardware to Software: webOS;33
8.1.5.1;The User Interface Is Where It’s At;35
8.1.5.2;Multitasking and Activities;36
8.1.5.3;The Card View;37
8.1.5.4;Navigation and Gestures;37
8.1.5.5;The Launcher;38
8.1.5.6;The Status Bar;38
8.1.5.7;Alerting the User to Background Activity: The Dashboard;39
8.1.5.8;Local Storage Facilities;41
8.1.5.9;Guiding Principles of webOS UI Design;41
8.1.6;How Palm Got Its Mojo Back;43
8.1.6.1;Mojo Standard Directory Structure;44
8.1.6.2;Stages;45
8.1.6.3;Scenes (Views and Assistants);45
8.1.6.4;The Scene Stack;46
8.1.6.5;Application Life Cycle;46
8.1.7;Getting Started with webOS Development;49
8.1.8;A Proper IDE Makes Things a Lot Easier;50
8.1.9;Why Break with Tradition? The HelloWorld Application;51
8.1.9.1;Building a Better (Hello) World;54
8.1.9.2;A Few Final Steps to Make This Work;58
8.1.10;Summary;63
8.2;CHAPTER 2 The Four, er, Three Horsemen of the Apocalypse;64
8.2.1;The Mojo API;64
8.2.1.1;Mojo.Animation;67
8.2.1.2;Mojo.assert(s) and Mojo.require(s);68
8.2.1.3;Mojo.Char;71
8.2.1.4;Mojo.Controller;71
8.2.1.4.1;Mojo.Controller.AppController;73
8.2.1.4.2;Mojo.Controller.StageController;74
8.2.1.4.3;Mojo.Controller.SceneController;74
8.2.1.5;Mojo.Depot;76
8.2.1.6;Mojo.Event;78
8.2.1.7;Mojo.Format;80
8.2.1.8;Mojo.Function/Mojo.Function.Synchronize;81
8.2.1.9;Mojo.Log;82
8.2.1.10;Mojo.Model;83
8.2.1.11;Mojo.Model.Cookie;84
8.2.1.12;Mojo.Service;85
8.2.1.13;Mojo.Transition;85
8.2.1.14;Mojo.View;86
8.2.1.15;Mojo.Widget;87
8.2.2;Building a User Interface: Widgets;87
8.2.2.1;Button;89
8.2.2.2;CheckBox;90
8.2.2.3;ToggleButton;90
8.2.2.4;RadioButton;91
8.2.2.5;ListSelector;92
8.2.2.6;DatePicker;93
8.2.2.7;TimePicker;93
8.2.2.8;IntegerPicker;94
8.2.2.9;List;95
8.2.2.10;FilterField;97
8.2.2.11;FilterList;98
8.2.2.12;TextField;98
8.2.2.13;PasswordField;100
8.2.2.14;RichTextEdit;101
8.2.2.15;ProgressBar;101
8.2.2.16;ProgressPill;102
8.2.2.17;Spinner;103
8.2.2.18;Slider;104
8.2.2.19;Drawer;105
8.2.2.20;ImageView;106
8.2.2.21;WebView;107
8.2.2.22;Menus;108
8.2.3;Hey, Can I Get Some Service Around Here?;110
8.2.3.1;Application Manager;111
8.2.3.2;Accounts;113
8.2.3.3;Alarms;113
8.2.3.4;Audio;114
8.2.3.5;Browser;115
8.2.3.6;Calendar;115
8.2.3.7;Connection Manager;116
8.2.3.8;Contacts;117
8.2.3.9;Document Viewers;118
8.2.3.10;GPS;118
8.2.3.11;Maps;119
8.2.3.12;Messaging;120
8.2.3.13;Phone;120
8.2.3.14;Photos;120
8.2.3.15;System Properties;121
8.2.3.16;System Service;121
8.2.3.17;System Sounds;122
8.2.3.18;Video;122
8.2.3.19;View File;122
8.2.3.20;Email;122
8.2.3.21;Accelerometer;123
8.2.3.22;Camera;124
8.2.3.23;Mojo Messaging Service;125
8.2.4;Summary;125
9;PART 2 The Projects;126
9.1;CHAPTER 3 A Place for Your Stuff: Code Cabinet;127
9.1.1;What Does This App Do Anyway?;127
9.1.2;Planning the Application;128
9.1.3;Creating the Skeleton;130
9.1.4;Exploring the Data Model;131
9.1.5;Configuring the Application;133
9.1.5.1;The appinfo.json File;133
9.1.5.2;The sources.json File;133
9.1.5.3;The framework_config.json File;134
9.1.6;Global-Scope Code;134
9.1.6.1;The CodeCabinet.js File;135
9.1.6.2;The DAO.js File;136
9.1.6.2.1;Initializing the DAO;139
9.1.6.2.2;Creating a Category;140
9.1.6.2.3;Retrieving Categories;140
9.1.6.2.4;Deleting a Category;141
9.1.6.2.5;Creating a Snippet;142
9.1.6.2.6;Retrieving Snippets;142
9.1.6.2.7;Updating a Snippet;144
9.1.6.2.8;Deleting a Snippet;144
9.1.6.2.9;Handling Errors;145
9.1.7;Setting the Stage;145
9.1.8;A Matter of Style;148
9.1.9;A Scene-by-Scene Account;149
9.1.9.1;Welcome Scene;149
9.1.9.1.1;The View HTML;149
9.1.9.1.2;The Scene Assistant;150
9.1.9.2;Category List Scene;151
9.1.9.2.1;The View HTML;151
9.1.9.2.2;The Scene Assistant;152
9.1.9.3;Category Add Scene;157
9.1.9.3.1;The View HTML;157
9.1.9.3.2;The Scene Assistant;158
9.1.9.4;Snippet List Scene;159
9.1.9.4.1;The View HTML;160
9.1.9.4.2;The Scene Assistant;160
9.1.9.5;Snippet Details Scene;161
9.1.9.5.1;The View HTML;162
9.1.9.5.2;The Scene Assistant;165
9.1.9.6;Search Scene;173
9.1.9.6.1;The View HTML;174
9.1.9.6.2;The Scene Assistant;175
9.1.9.7;Search Results Scene;176
9.1.9.7.1;The View HTML;176
9.1.9.7.2;The Scene Assistant;177
9.1.9.8;Preferences Scene;181
9.1.9.8.1;The View HTML;181
9.1.9.8.2;The Scene Assistant;182
9.1.10;Suggested Exercises;184
9.1.11;Summary;184
9.2;CHAPTER 4 A Gateway to Industry: Local Business Search;185
9.2.1;What’s This App Do Anyway?;185
9.2.2;AJAX;187
9.2.2.1;The Trouble with AJAX;188
9.2.3;Meet the Yahoo! Web Services;189
9.2.3.1;The Yahoo! Search Service;189
9.2.3.2;The Yahoo! Map Image Service;191
9.2.4;Planning the Application;192
9.2.5;Creating the Skeleton;194
9.2.6;The Data Model;195
9.2.7;Application Configuration;195
9.2.7.1;appinfo.json;195
9.2.7.2;sources.json;196
9.2.7.3;framework_config.json;196
9.2.8;Global-Scope Code;197
9.2.8.1;LocalBusinessSearch.js;197
9.2.8.1.1;Opening the Depot;198
9.2.8.1.2;Is the Internet Out There?!?;200
9.2.9;Setting the Stage;201
9.2.10;A Matter of Style;204
9.2.11;A Scene-by-Scene Account;206
9.2.11.1;Welcome Scene;206
9.2.11.1.1;The View HTML;207
9.2.11.1.2;The Scene Assistant;207
9.2.11.1.3;Dealing with Orientation Changes;208
9.2.11.2;Search Scene;211
9.2.11.2.1;The View HTML;211
9.2.11.2.2;The Scene Assistant;214
9.2.11.2.3;Handling Commands;217
9.2.11.2.4;Getting a GPS Fix;218
9.2.11.2.5;Clearing the Search Fields;220
9.2.11.2.6;Performing a Search;220
9.2.11.3;Search Results Scene;222
9.2.11.3.1;The View HTML;223
9.2.11.3.2;The Scene Assistant;223
9.2.11.3.3;Handling Returned Search Results;226
9.2.11.3.4;Handling User Selection of a Search Result;228
9.2.11.4;Item Details Scene;229
9.2.11.4.1;The View HTML;229
9.2.11.4.2;The Scene Assistant;230
9.2.11.4.3;Activating and Deactivating the Scene;233
9.2.11.4.4;Handling Commands;235
9.2.11.4.5;Getting a Map Image;238
9.2.11.4.6;Handling Orientation Changes;239
9.2.11.5;Favorites Scene;240
9.2.11.6;Preferences Scene;242
9.2.11.6.1;The View HTML;242
9.2.11.6.2;The Scene Assistant;243
9.2.12;Suggested Exercises;245
9.2.13;Summary;246
9.3;CHAPTER 5 Time for a Break: Engineer, a webOS Game;247
9.3.1;What’s This App Do Anyway?;247
9.3.2;Planning the Application;249
9.3.3;Creating the Skeleton;250
9.3.4;The Data Model;252
9.3.5;Application Configuration;252
9.3.5.1;The appinfo.json File;252
9.3.5.2;The sources.json File;253
9.3.5.3;The framework_config.json File;253
9.3.6;Global-Scope Code;254
9.3.7;Setting the Stage;254
9.3.8;A Matter of Style;254
9.3.9;A Scene-by-Scene Account;255
9.3.9.1;titleScreen Scene;255
9.3.9.1.1;The View HTML;255
9.3.9.1.2;The Scene Assistant;258
9.3.9.2;Game Screen Scene;261
9.3.9.2.1;The View HTML;261
9.3.9.2.2;The Scene Assistant;263
9.3.9.2.2.1;Setting Up the Scene;268
9.3.9.2.2.2;Activating the Scene;270
9.3.9.2.2.3;Starting a New Game;273
9.3.9.2.2.4;Playing a Sound (and Avoiding Redundant Code!);276
9.3.9.2.2.5;The Main Game Loop;277
9.3.9.2.2.5.1;Drawing the Frame and Flashing the Lights;277
9.3.9.2.2.5.2;Drawing the Control Console and Hands;278
9.3.9.2.2.5.3;Drawing the Game-Play Area;279
9.3.9.2.2.5.4;The Main Game Logic (As Implemented for Each Particle);279
9.3.9.2.2.5.5;Changing a Particle’s Direction;283
9.3.9.2.2.5.6;Heating Up the Engine;284
9.3.9.2.2.5.7;Updating the Players’ Score;285
9.3.9.2.2.6;Handling Player Input;286
9.3.9.3;Game Over Dialog Box;288
9.3.9.3.1;The View HTML;288
9.3.9.3.2;The Scene Assistant;289
9.3.10;Suggested Exercises;291
9.3.11;Summary;292
9.4;CHAPTER 6 Keeping an Eye on Friends: Twitter Monitor;293
9.4.1;What’s This App Do Anyway?;293
9.4.2;Meet the Twitter Web Services;294
9.4.2.1;The RESTful Approach to Web Services;294
9.4.2.2;Verifying a User;295
9.4.2.3;Getting a List of Friends;295
9.4.2.4;Getting the Most Current Status of a Specific User;296
9.4.3;Planning the Application;296
9.4.4;Creating the Skeleton;298
9.4.5;The Data Model;299
9.4.6;Application Configuration;299
9.4.6.1;The appinfo.json File;299
9.4.6.2;The sources.json File;299
9.4.6.3;The framework_config.json File;300
9.4.7;Global-Scope Code;300
9.4.8;Setting the Stage;301
9.4.9;A Matter of Style;301
9.4.10;A New Kind of Helper: The Application Assistant;302
9.4.10.1;A Couple of Data Fields;302
9.4.10.2;Handling Launch;303
9.4.11;A Scene-by-Scene Account;304
9.4.11.1;Main Scene;304
9.4.11.1.1;The View HTML;305
9.4.11.1.2;The Scene Assistant;306
9.4.11.1.2.1;Setting Up the Scene;306
9.4.11.1.2.2;Activating the Scene;308
9.4.11.1.2.3;Getting to the Heart of the Matter: Monitoring Feeds;309
9.4.11.2;Settings Scene;312
9.4.11.2.1;The View HTML;312
9.4.11.2.2;The Scene Assistant;314
9.4.11.2.2.1;Setting Up the Scene;314
9.4.11.2.2.2;The List Template;318
9.4.11.2.2.3;Cleaning Up After Ourselves;319
9.4.11.2.2.4;Getting Friends List from Twitter, Part I;320
9.4.11.2.2.5;Verifying the Twitter Account;321
9.4.11.2.2.6;Getting Friends List from Twitter Part II: The Sequel!;322
9.4.11.2.2.7;Saving Changes;323
9.4.11.2.2.8;Handling Application Menu Commands;324
9.4.12;Suggested Exercises;325
9.4.13;Summary;325
9.5;CHAPTER 7 Project Management for All: Time Tracker;326
9.5.1;What’s This App Do Anyway?;326
9.5.2;Google App Engine: Life in the Cloud(s) Is Good!;328
9.5.3;Getting Started with GAE;330
9.5.4;Defining the API: Let’s Take a REST;334
9.5.5;The Server-Side Code;335
9.5.5.1;One DTO As an Example: Project;335
9.5.5.2;Defining Responses: OkResponse and ErrorResponse;337
9.5.5.3;Some Utilities to Make Life Easier;338
9.5.5.4;Handling Requests: ProjectServlet;339
9.5.5.4.1;Creating and/or Updating a Project;341
9.5.5.4.2;Retrieving Project(s);345
9.5.5.4.3;Deleting a Project;346
9.5.5.5;Tasks and Resources;347
9.5.5.6;A Little Bit of Configuration;347
9.5.6;Planning the Application;348
9.5.7;Creating the Skeleton;350
9.5.8;The Data Model;350
9.5.9;Application Configuration;352
9.5.10;Global-Scope Code;352
9.5.10.1;The DAO.js File;352
9.5.10.1.1;Initializing the DAO;354
9.5.10.1.2;Creating an Entity;355
9.5.10.1.3;Retrieving Entities;357
9.5.10.1.4;Updating an Entity;360
9.5.10.1.5;Deleting an Entity;360
9.5.10.2;The TimeTracker.js File;361
9.5.11;Setting the Stage;364
9.5.12;A Matter of Style;364
9.5.13;A Scene-by-Scene Account;366
9.5.13.1;Title Scene;366
9.5.13.1.1;The View HTML;366
9.5.13.1.2;The Scene Assistant;367
9.5.13.2;Welcome Scene;368
9.5.13.2.1;The View HTML;369
9.5.13.2.2;The Scene Assistant;369
9.5.13.3;Log In Dialog Scene;370
9.5.13.3.1;The View HTML;371
9.5.13.3.2;The Scene Assistant;372
9.5.13.4;Project Administration Scene;375
9.5.13.4.1;The View HTML;376
9.5.13.4.2;The Scene Assistant;376
9.5.13.5;Project Details Scene;378
9.5.13.5.1;The View HTML;379
9.5.13.5.2;The Scene Assistant;380
9.5.13.6;Task Details Scene;386
9.5.13.6.1;The View HTML;387
9.5.13.6.2;The Scene Assistant;387
9.5.13.7;Resource Administration Scene;389
9.5.13.8;Resource Details Scene;389
9.5.13.9;Book Time Scene;391
9.5.13.9.1;The View HTML;391
9.5.13.9.2;The Scene Assistant;392
9.5.13.10;Summaries Scene;396
9.5.13.10.1;The View HTML;396
9.5.13.10.2;The Scene Assistant;397
9.5.13.11;Project Summary Scene;401
9.5.13.11.1;The View HTML;401
9.5.13.11.2;The Scene Assistant;402
9.5.13.12;Task Summary and Resource Summary Scenes;404
9.5.14;Suggested Exercises;405
9.5.15;Summary;406
10;Index;407




