Foreword

Greg Stevenson

Sierra Blanco SystemspreDevCamp Global Organizer

Many of us remember that special sense of accomplishment, even excitement, as we got our very first program to run or web page to display. It was probably something very simple like a classic “Hello, World!” program, or a simple (often gaudy) web page using different styles and sizes of text. Steadily we learned and experimented more. In a short time, we soon had something actually useful. It was probably something like a tip calculator or a personal web page, or even a tip calculator on a web page. It was exciting because we realized the huge potential for doing much more with our newfound knowledge.

That first moment for me was more than 30 years ago. Like many others at that time, it was the start of a hobby that soon became a career. Programming and web development can be one of the most exciting and one of the most frustrating careers one can have. It is immensely rewarding to create something that benefits hundreds, thousands, even millions of people. At the same time, the pace at which things change can really wear one down. I’ve now seen, used, and discarded so many cool technologies it is rare for any of them to get me really excited. Prior to Palm’s announcement of webOS, I can only think of two times a new technology generated a similar visceral excitement as I had when I first learned to program. (Forth and Delphi, if you are curious. Search for those terms and my name to see what made them special.) webOS has rekindled those feelings all over again.

I, like many other smartphone users and developers, was very curious to see what Palm would show on January 8th, 2009, at the Consumer Electronics Show (CES) in Las Vegas. Truthfully, I was not expecting much. I just wanted to give Palm one more chance before switching from my Treō to another smartphone. However, that day the Palm Prē became the star of CES. Nothing else introduced that week came close to generating the buzz of the Prē. But while the Prē was nice, there were other smartphones that looked cool, had a great UI, and even did multitasking. Even after the great demos, for me the Prē was just a “take it or leave it” proposition. What got my interest was webOS, the underlying technology that made those great demos possible. I had to learn more, and the more I learned, the more excited I got.

For me, the best way to force myself to learn is to teach. About 15 years ago, when I last got this excited, I started a user group for Delphi months before I actually had a copy of it (I was tight on funds at the time). Continuing the tradition, I started a Meetup for webOS and the Prē on February 18th. I volunteered to be an organizer for preDevCamp, a world-wide day for developers to share and learn about webOS. I also volunteered to talk about webOS development at a regional CodeCamp. At the same time, I started developing for webOS. All this was happening long before the webOS software development kit (SDK) was even announced. Granted, there was little public information, but everything I gleaned confirmed my initial feeling that webOS was something to master.

How could I develop or talk about webOS when there wasn’t even an SDK? That is the beauty of webOS. It is a very unique blend of existing technologies with some special Mojo provided by Palm. It allows one to develop native-style applications like you would find running on a traditional computer using web-based technologies such as HTML, JavaScript, and CSS. My group started working on the JavaScript parts of our applications that seemed be the most portable and incorporated new knowledge as it became available. When you think about it, the Internet is so pervasive that most developers today already have considerable experience with these web-based technologies. Native webOS applications are launched via index.html. Sound familiar? Most developers seem to come up to speed on webOS quickly. It helps that webOS does a lot of the tricky stuff for you automatically.

Not long after I started my journey on the road to webOS, O’Reilly announced that a Rough Cuts version of this webOS book was available. Rough Cuts is a great program that allows you to read chapters of a book as it is being written. I immediately got “copies” of the book for myself and my developers. As chapters became available, I would print them out and study them. This period also saw the appearance of websites, forums, and IRC channels that were dedicated to webOS. preDevCamp also had organizers in about 75 cities with close to 1,000 developers signed up to attend. I was by no means alone in my desire for the webOS SDK and a Palm Prē to test my applications. When Palm finally announced they were taking applications for the SDK beta, I remember Palm posting that they got about a gazillion applications in just a couple of days.

Of course, I also applied and was fortunate enough to get accepted into the program sooner than many. It was like getting a new bike for Christmas, only you couldn’t ride it in public or tell anyone else about it. Fortunately, this book, the webOS SDK, and Prē phones are all now readily available—you don’t have to wait. Since the SDK runs on Linux, Mac OS X, and Windows, this means you can probably even use your existing development environment for webOS development as well. There are also several plug-ins to automate webOS development in popular IDEs.

So, what did I find so special about webOS? It is the almost elegant way in which it solves a lot of issues surrounding the current direction of application development in general—and mobile application development in particular—with its unique integration of native and web-based computing. Chapter 1, Overview of webOS, has a lot more specifics. As I stated earlier, it smoothly leverages the latest in open technologies and standards like Linux, the WebKit engine, HTML 5, Javascript, and CSS3, to bring mobile device development to all programmers. It has the potential to have the same impact for mobile applications as Visual Basic and Delphi did for win32 applications. The rapid appearance of homebrew applications shortly after the Palm Prē was released demonstrates the relative ease of development. The richness of some the applications in Palm’s Application Catalog demonstrates that webOS is fully capable of supporting sophisticated software.

Another thing I like about webOS is that it tends to encapsulate best practices, such as using the Model-View-Controller pattern as a natural part of webOS development. By carefully exposing services and APIs, developers have ready access to powerful features and yet still allow each application to play nicely with others. Although I expect more low-level access in the future, the design of webOS is such that low level features can easily be wrapped and exposed through webOS’s Mojo framework.

Developing applications is pointless if nobody wants to use them. The Mojo framework provides a smart and polished user interface with lots of useful widgets. The card metaphor for switching between applications and the notification system is currently without peer in the realm of smartphones. There is another advantage that webOS provides users: the ability for applications to dynamically interact with each other and with network services in a clean and consistent fashion. For example, contact information is available to other applications, not just the contact application. Using Palm’s Synergy, Contact information can be automatically updated from a variety of sources over the network just like web mashups are able to do. However, as a native application, the latest information is still available, even if the network is not. Regardless of the circumstances, webOS lets applications “just work” as the user expects.

Since webOS is a new platform, it has lots of room to grow. Palm emphases that the Prē is/was just the first of many devices on which webOS can run. This means more devices, more services, and more APIs are planned for the future. Each iteration will spawn a need for new applications to exploit new features. webOS has the potential for keeping developers very busy for many, many years.

I could go on, but Mitch already gives a fine introduction to webOS in the first chapter of his book. Mitch is uniquely qualified to be the author of the first book on the topic. He has been doing software development for a long time, especially on mobile platforms. As software CTO at Palm, he has been the driving force for webOS. In writing this book, he realizes that developers want more than an assortment of simple “Hello World” examples—they want to be able to develop real working applications.

Mitch gradually introduces the reader to webOS while building a fully functional RSS news reader. Each step of the development process is fully explained in tutorial fashion. The reader also learns best practices for webOS development along the way. This book does not try to pad itself with reference information readily available in the SDK. I also like the fact that Mitch points out current limitations in webOS so developers can work around them to provide a positive user experience.

Lastly, I would like to share how committed Palm is to developers. There have been rough spots. The majority of my posts in the developer forums have been and will be regarding issues I have with Palm and webOS. Even so, I’m actually amazed at how open, helpful, and accessible Palm has been. Palm’s webOS team frequents the forums and answers questions directly. They totally get that their success is intimately tied to an active, prolific community of webOS developers.

That said, get this book, get the SDK, and start writing webOS applications. I hope you enjoy it as much as my team and I do.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.202.122