Friday, June 22, 2007

The Symbian OS Architecture Sourcebook by Ben Morris

As a Symbian developer, you're locked out from most of the system-level information, which is why it's a good thing that books like this one, Symbian OS Internals and Symbian OS Platform Security are published. Just like those other books, this one contains some very good information, and is a very frustrating read because of all the omissions and/or the weird structure.

The author of this book is trying to do two things with this book: to provide a description of the high-level design of the OS and to tell the history of the development of it. This sounds manageble, but it leads to a very fragmented book. The most interesting stuff is contained in the first part, which is mostly historical. Here we get explanations for stuff like descriptors and MMP files (they were borrowed from VMS), and gain an understanding on why Symbian OS is such a weird system (most of the architects just don't seem to know much about computer systems, so they invented everything as they went along).

The second part is a description of the different parts of the system. This one probably isn't meant to be read straight through, and I found myself skipping quite a few pages. This section isn't boring just because of the topic, but mostly, I think, because it's so badly written. Everything is repeated a great number of times, which gives the book a distinctly American feel, although (I believe) the author is British.

The third part consists of case studies, and is more similar to the first part. There's some interesting history here, but much of this stuff is repeated from the first part, and reading it for the second time doesn't exactly make it more interesting.

The reference in the appendix feels quite unnecessary. It's just a listing of components, with some basic facts, such as their names, build file location, which OS releases they're included in and one line descriptions. I don't quite get the point of including this part in the book, in the Internet age. This would have made much more sense in electronic form, where it can be easily searched, and much more information could have been included.

One theme that runs through the whole book is what I'd like to describe as the effects of the Symbian Reality Distortion Field. Steve Jobs might have made it famous, but Symbian Ltd. are without a doubt the masters of creative bending of the truth. Sure, we've heard most of this stuff before, but anyway, here are a few examples: Descriptors, the first thing most developers will mention when ranting about how weird and difficult Symbian is to program for, is described as a gift from god. Active objects are described as the best possible event handling mechanism, despite the headaches it gives developers. I suppose the author hasn't bothered to study alternative solutions, as the only alternative he mentions is the archaic event loop. The praise of the horrible UI framework feels more like an insult than anything else, and claiming that "the system has been optimized to produce fast graphics on low-power devices" is just crazy. Anyone who's tried using the Symbian graphics routines know that that's just not true. The only way to get decent graphics performance out of a Symbian device is to use Direct Screen Access, which bypasses the system's drawing code.

On a more positive note, the description of the system design gives me the impression that a lot of good design decisions have been made on a high level. Unfortunately for the developer, on the API level everything seems to have gone wrong. The explanation for this seems to be that the designers were learning C++ as they were constructing the API:s.

All in all, the first part makes the book worth reading, and the other parts provide some additional insights. Again, it's a book that gives you information that you can't find anywhere else, unless you're a Symbian (or partner) employee, and for that reason it's worth reading. However, the evangelism is quite offensive, so it's not an easy read if you've just eaten.

No comments: