Palm webOS: Developing Applications in Javascript Using the Palm Mojo Framework – Page 9
The core OS is based on a version of the Linux 2.6 kernel with the standard driver architecture managed by udev, with a proprietary boot loader. It supports an ext3 filesystem for the internal (private) file partitions and fat32 for the media file partition, which can be externally mounted via USB for transferring media files to and from the device.
The Wireless Comms system at the highest level provides connection management that automatically attaches to WAN and WiFi networks when available, switches connections dynamically, prioritizing WiFi connections when both are available. EVDO or UMTS telephony and WAN data is supported depending upon the particular device model. Palm webOS also supports most standard Bluetooth profiles and provides simple pairing services. The Bluetooth sub-system is tightly integrated with audio routing to dynamically handle audio paths based upon user preferences and peripheral availability.
The media server is based upon gstreamer and includes support for numerous audio and video codecs, all mainstream image formats, and supports image capture through the built-in camera. Video and audio capture is not supported in the initial webOS products, but is inherently supported by the architecture. Video and audio playback supports both file and stream-based playback.
Of course the best way to get started writing webOS applications is to continue reading this book, but you should also go to Palm’s developer site, http://developer.palm.com and register as a Palm developer and download the Palm Software Developer Kit (SDK). The SDK includes the development tools, sample code, the Mojo Framework, along with access to the Palm Developer Wiki, where developers will find formal and informal training materials, tutorial and reference documentation. Palm also provides registered developers with direct technical support by email or through interaction in a hosted developer forum.
The Palm Developer Tools (PDT) are installed from the SDK and include targets for Linux, Windows (XP/Vista) and Mac OS X. The tools enable you to create a new Palm project using sample code and framework defaults, search reference documentation, debug your app in the weOS emulator or an attached Palm device, and publish an application. Chapter 2 includes more details about the tools in Palm’s SDK and third-party tools, but you’ll find a brief summary in Table 1-1 below.
| Tools | Major Features |
| SDK Bundle Installer | Installs all webOS tools & SDK for 3rd party editors |
| Emulator | Desktop Emulator and Device Manager |
| Command-Line Tools | Create New Project |
| Install & Launch in Desktop Emulator or Device | |
| Open Inspector/Debugger Window | |
| Package & Sign App |
The tools can be installed and accessed as command-line tools on every platform and include some bundles for integration into popular HTML editors and as a plug-in to Eclipse and Aptana Studio, a popular Javascript/HTML/CSS editor for Eclipse. Refer to Palm’s Developer portal for the most current list of supported editors and tool bundles.
The SDK installation includes a copy of the Framework and sample code to help you design and implement your application. Unlike most JavaScript frameworks, you won’t need to include the Mojo framework with your application code since Palm includes the framework in every webOS device. The framework code included in the SDK is for reference purposes to help you with debugging your applications.
The sample code is also for reference. There are samples for most of the significant framework functions, including application lifecycle functions, UI widgets and each of the services. Simple applications are included to give you some starter applications to review and leverage as you choose.
Your main entry point is http://developer.palm.com/, which is where Palm hosts the Developer Portal. The portal provides access to everything that you might need to build webOS applications, including access to the SDK, all development tools, and documentation and training materials.
The Developer Portal provides your application signing services and access to the Application Catalog. This is an application store that is published and promoted with every webOS device through a built-in App Catalog application. Applications need to be signed for installation on a webOS device, and through the portal you can access the signing tools and related support.
In this introductory chapter, you were introduced to webOS, Palm’s next generation operating system. The following chapters will cover each of these topics in far more detail but this chapter should have helped you understand the webOS architecture and application model along with the basic services available in the SDK.
You’ll find that it’s pretty easy to get started writing webOS applications. After all, you’re simply building web applications, using conventional web languages and tools. You can port a very simple Ajax application by creating an appinfo.json file for your application at the same level as your application’s index.html file. With as little as that, your app can be published and available for download to any webOS device.
From there you can invest more deeply by building in the Mojo UI widgets to take advantage of the fluid physics engine, gesture navigation, beautiful visual features, text editing, and the powerful notification system. You can move beyond simple foreground applications that rely on active user interaction, and adapt your application to run in the background or even be headless. Or consider an application that can open new windows for each new activity, enabling the user to multi-task within a single application. There’s a whole new generation of applications possible on the webOS platform, just waiting to be built.