Palm webOS by Mitch Allen: A Real (Book) Review | webOS Nation
 
 

Palm webOS by Mitch Allen: A Real (Book) Review 11

by Jonathan I Ezor Wed, 30 Dec 2009 1:54 pm EST

Palm webOS by Mitch Allen

As a wanna-be developer, I rejoiced in the announcement in February of O'Reilly Books' Palm webOS by Mitch Allen, read the free first chapter and even purchased the online preview version, in the hopes that it could turn me into a webOS developer. Now that I have read a review copy of the final print version, though, I am sad to say that it did not magically do so. On the other hand, experienced developers and those beginners who already know the basics of HTML and Javascript will find the book a hugely useful resource, and even those who are not yet at that level (but may be considering giving it a try, especially with the recent release of Palm's Web-based Project Ares online development environment) will benefit from its clear discussion, code examples, best practices and identification of pitfalls. Even for the non-developer, Palm webOS provides insight into how applications work and interact on the Pre and Pixi.

 

Author Mitch Allen is the CTO of Palm, and the book benefits from his deep understanding of both the software and hardware architecture of webOS devices like the Pre (the book doesn't mention the Pixi, since it was released prior to the Pixi's launch). Rather than simply talking about webOS development, or rehashing what is already in the free Software Development Kit, Palm webOS leads the reader through the development of a real-world webOS application, an RSS news reader (available via this thread). Beginning in Chapter 2 with the basics of how to create and name a blank application, subsequent chapters demonstrate how to add text and graphics, buttons and sliders, database access and so on.

Beyond the actual development, the book also includes a chapter on localization (formatting applications for multiple countries/languages), information on the Palm Developers Program (Appendix A) a Quick Reference (Appendix B) with some of the most commonly used programming elements (widgets, dialogs, menus, services, etc.), a style guide (Appendix C), and the full source code for the final RSS reader application reflecting its evolution throughout the book (Appendix D). Along the way, Allen uses the O'Reilly "animal" book standard stylesheet and icons (pawprints for tips; bear traps for cautions)to help the reader quickly identify particular elements. (According to the "Colophon" on the final page, the animal shown on the cover is a luna moth, a reference to the "Luna" codename used by Palm for the webOS application environment.) Purchasers also get 45 days free access to the online edition via a code printed in the book, and the book has its own Web page with error fixes, code examples, and additional information .

Palm webOS is clear about its target audience; in the Preface, Allen states,

"You don't need to be an expert, but you will need some basic knowledge of JavaScript, HTML and CSS to follow the examples presented here. This book is intended to provide an introduction to webOS and building webOS applications, but should nto be used as a guide to writing JavaScript code. In fact, I have to warn you that I wrote my first JavaScript code as part of writing this book and it's very likely that you will see several examples of not-so-good JavaScript in here."

As a would-be developer, I was able to largely understand the book's code examples, particular with Allen's explanations before and after each portion. I could not say whether the code was "not-so-good," although a few of the reviews of the book on the O'Reilly Web site suggest that there are some errors within the code provided by Allen. As a guide for further exploration, though, the programming examples serve a valuable function for experienced and novice readers alike, especially when (as suggested by Allen) they continue their learning via the documentation in the webOS SDK. 

One interesting addition to the book is the honest foreword by Greg Stevenson, a PreDevCamp Global Organizer. While praising webOS, Stevenson does not hide the fact that "[t]here have been rough spots" in Palm's relationship with its developers, but nevertheless states "how committed" the company is. (For those that may not have followed the PreDevCamp/Palm story, you can learn about it here.) Stevenson concludes, "[t]hey totally get that their success is intimately tied to an active, prolific community of webOS developers."

Overall, Palm webOS is a must-have for any developer starting to build apps for the Pre and Pixi, and a useful reference guide even for more experienced programmers. For the rest of us, it can teach us more about our devices, or perhaps even inspire us to create our own applications for ourselves or the broader webOS user community.

Pros

Written by Palm's own CTO

Cons

JavaScript code may not be perfect

11 Comments

What's with the moth, being on the book cover? What does that have anything to do with Palm, or webOS? lol

O'Reilly is known for picking an animal or some type of "mascot" for most/all books it publishes.

From O'Reilly site (http://oreilly.com/catalog/9780596155261):

"Colophon

The animal on the cover of Palm webOS is a luna moth (Actias luna). Luna moths usually live in North American regions filled with black cherry, maple, hickory, willow, and other trees with leaves that can feed their young.

...

Luna moths have inspired many: Luna Moth is the name of a character in Michael Chabon's novel The Amazing Adventures of Kavalier and Clay (Picador), and Vladimir Nabokov, who was also an accomplished lepidopterist, has described the insect admiringly in his writings. Crafters have also paid homage to the insect's vivid wings with products ranging from shawls to stained glass. Luna was also Palm, Inc.'s code name for the webOS application environment, including the Mojo framework.

The cover image is from Dover's Animals. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSansMonoCondensed."

"Luna" is still used in the Pre's file system. (ex. /var/luna/data/...)

The challenge with this book is that WebOS and the SDK is still changing so fast, that some of what worked in the book didn't any more, once it was in print. This makes it hard for someone to get certain things working, unless they are at a point where they don't really need to book anymore. Kind of a catch-22.

Things like Ares makes some obsolete. We are in rapidly changing times and the speed at which books are written and published, just can't keep up.

Four stars? Are you kidding me? As a developer, this is the worst tech book I've ever read. Amazon.com purchasers agree with me (2/5 stars). None of the example code will work without modification (I'm not kidding when I say "none"). The author is too familiar with the material, and frequently forgets to go over the basics before diving into more advanced material.

It truly will do no one any good. Even the reference material in the back is missing much critical information.

Another webOS book recently came out... "Practical Palm Pre WebOS Projects". I have not looked at it yet, but it certainly couldn't be worse than this one.

Ok then, it might be a good question to ask here. I'm trying to get into WebOS development myself. I'm a Pre fanatic myself, and feel like I could bring some good apps to the catalog too. I'm a programmer and tester by profession, but not a very good designer and haven't worked a lot in css and javascript, though I know the basics of both. So my question is, what do you guys recommend for getting a head start. I was thinking that I would start of with Ares (which i kind of already have), go through the tutorial for that Ares and then start building my own app. Do you guys think that should be enough, or do you think a formal read through of books like this or the newer own (Practical Palm Pre WebOS projects) is necessary? I have heard a lot of bad reviews for Tim's book, so I don't think I'll get that one, but I'm not sure whether I should even bother reading the other book, because that'll only take that much more time. Any suggestions are appreciated.
P.S. I know I should post this in the WebOS dev forums, but I thought I could get some general answers here first, before diving in.

Yes, try out the Ares gui tool (http://developer.palm.com/index.php?option=com_content&view=article&id=1528). It makes basic UI design easy.

You'll also want to be familiar with JavaScript but you can read any of the better books about that. See the reference section of http://webos101.com/Getting_Started as well.

A technical book review written by a "wanna-be developer"? Sorry if I offend, but how helpful is that? The best that can be said of this book is that it's better than nothing. It is hard to read and contains numerous inaccuracies. You're better off reading PreCentral's forums and webOSdev. Save your money.

A review of the book 4 months after release of the book that most of us have read, re-read, copied from, stolen, found bugs in, torn pages from, made notes in, eaten,......

A bit late.

Book is ok but really not all that. It should be re-written from scratch. It should not wast pages by adding the source code for the application used in the book and some of the reference information is really not that good. I sometimes refer back to the book but for the most part I look at the online docs and the samples that come with the SDK.