C/C++ Users Journal March, 2005

Programmer's Book Review

By John Kern

John Kern is a software developer at Kern Computing in Menlo Park, CA. He can be reached at kern@acm.org.

Developing Series 60 Applications: A Guide for Symbian OS C++ Developers
Leigh Edwards and Richard Barker
Addison-Wesley Professional, 2004
800 pp., $49.99
ISBN 0321227220

Today mobile phones have a surprising amount of RAM, a plethora of communication options, and some interesting peripherals. Many APIs to fundamental facilities already exist including personal information management, connectivity, and multimedia. Given these resources, mobile phones are fertile ground for new application development. But how do you program it? Leigh Edwards and Richard Barker introduce you to the programming Symbian OS/Series 60 via the native C++ APIs in Developing Series 60 Applications: A Guide for Symbian OS C++ Developers. Symbian OS is a sophisticated OS designed specifically for mobile computing. Series 60 adds a consistent user interface and many extensions to the Symbian OS.

The title suggests it is limited to C++ developers familiar with Symbian, and that's clearly the case: You do need a background in C++ and object-oriented programming. But while this book focuses on Series 60, I found its overview of the Symbian OS to be sufficient to get started. The authors explain the fundamentals of the Symbian OS. C++ programming in this environment uses some unique facilities. For historical reasons, C++ exceptions are not used. Instead, the Symbian OS uses the Leave facility, which is simple and lightweight. Also, STL is not supported. However, the OS does provide a small set of collection classes and their own string class called Descriptors. Users are tempted to use something familiar for string manipulation, but all the APIs are built on or around Descriptors. Edwards and Barker recommend biting the bullet and using them from the start.

Another challenge is assembling the programming environment. Which IDE should you use? While they are agnostic about which to use, Edwards and Barker steer you to information with respect to Metrowerks, Borland, and Microsoft. There are a lot of supporting files involved with the development process. They explain their purpose. How does the development cycle change? The authors talk about using the emulator in the compile/edit/debug cycle along with some hard-won facts. For example, if the emulator panics, it only displays "Program Closed." The authors tell you how to create a file called "ErrRd" in a specific directory, which forces critical information about the error to be displayed.

They provide a lot of working demos, which makes for a great resource. The only downside is Developing Series 60 Applications can't be read without downloading the demos and documentation for system APIs because the code segments in the book often refer to certain symbols, but do not provide any definition. This also implies that you'll need a computer nearby while reading the book. Using small example programs that could be entirely encapsulated in the text would be more readable, but this would only be possible with some introductory material.

Edwards and Barker's style tends to be very systematic. This makes for a good reference. When discussing the various types of editors, they iterate through them. This turns out to be useful because it enumerates the possible options for the resource file that is used to define the GUI. Normally, the resource language is defined by a grammar from the platform provider. However, I haven't been able to find one for Series 60. For a reference, the index is not very comprehensive, which limits its usefulness.

There is a downside to their systematic nature. On occasion, they talk about an obscure feature instead of the common behavior. For example, there is a section discussing how the screen is divided into panes. While detailing the navigation pane, they tell you how to display tabs there. Good. This is the most common usage. They tell you how to display text there. Good. This can be handy. They tell you how to display images there. Okay, I might use that feature. They tell you how to display a volume control there. Okay, I haven't seen an application like this, but it can't be ruled out. They do not discuss switching between panes as tabs are selected in any meaningful way. As this is the most common usage, I'm disappointed that Edwards and Barker didn't elaborate on this point.

Developing Series 60 Applications is very timely and covers a lot of ground. If you're getting started with Symbian OS/Series 60, this is a good way to jumpstart yourself.