Channels ▼
RSS

Web Development

Smartphone Operating Systems: A Developer's Perspective


The Nokia S60 Platform

Without a doubt, Nokia is the steward of the mobile phone market. It dominates the smartphone industry, both in market share and sheer volume of devices sold. The Finnish company sold its first mobile phone in 1992, and at the end of 2008 it owned 38.6 percent of the world market share, according to ABI Research. Admob, which tracks on-line requests to web sites by platform, pegged Nokia's share in mobile network traffic at 41 percent. In terms of devices shipped, the numbers are impressive: In 2005, the billionth (yes, that's with a 'b') Nokia phone was sold. Nokia's smartphone platform, the S60, was introduced in 2001 and the first handset that incorporated the platform was the Nokia 7650. While smartphones are a subset of the Nokia's product line, the numbers are formidable: Nokia shipped 180 million S60-based devices in 2008.

The S60 Platform is a smartphone reference design that provides a consistent interface and execution environment across the various devices made by Nokia and its licensees, which include Samsung, Lenovo, and LG. Some of the S60 Platform's key features are:

  • Multitasking operating system that executes multiple third-party apps simultaneously
  • Memory protection that implements a robust and secure execution environment
  • Power management software conserves energy on battery-powered devices
  • Bluetooth and TCP/IP connectivity
  • Asian language support
  • Multitouch interface with haptic feedback (available in the fifth edition)
  • Can execute Java ME applications
  • Has enablers for enterprise support, such as push-based e-mail and protocols for synchronizing Exchange e-mails and contacts
  • Numerous avenues to develop S60 applications, using different programming languages and several sets of tools

To see how S60 Platform implements these features, a tour of its software stack is in order. The platform's layered structure (figure 1) allows the platform to address the different needs of Nokia, the network operator, and the developer.

[Click image to view at full size]
Figure 1: S60 software stack

The topmost layer is the Applications Layer, which is where native S60, licensee, operator, and third-party applications execute.

Beneath this layer is the S60 Scalable UI layer. This layer was developed and is licensed by Nokia, and consists of UI frameworks. The visible components of these frameworks adjust for different screen sizes, or when the device switches between portrait and landscape screen orientations. They use Scalable Vector Graphics - Tiny (SVG-T) and relative positioning to achieve this capability. These UI components also adopt the device's localization settings and rules, such as which direction to draw text, and how to display the calendar and time. The UI framework provides a toolkit of ready-to-use components that implement lists, editable forms, grids, notification screens, content viewers, and other visual UI elements.

The next layer in the S60 Platform stack is the Runtimes layer. As its name implies, this layer contains the runtime libraries that support various programming languages, interactive content display, and web rendering. For example, the runtime libraries for Symbian C++, and Open C/C++ programming languages reside here. It also houses the execution environment for Java ME. Web support for the S60's web browser and for Web Runtime (WRT) widgets is provided via a WebKit rendering engine. The Runtimes layer also supports bindings for other execution modules such as Flash Lite and Python.

The Platform Libraries and Middleware Layer contains the frameworks used to implement specific services for layers higher in the stack, or expose lower-level OS APIs in the stack to the developer. It contains various application engines that manage Personal Information Management (PIM) data, messaging, and data synchronization. Multimedia content rendering — such as video decoding — is performed here. Camera and audio recording interfaces are provided for multimedia applications. A security framework manages the security certificates and keys used for secure data sessions.

The Symbian OS and Security Platform Layer resides at the lowest part of the stack. The Symbian OS provides fundamental system services for the S60 Platform. The OS is microkernel-based, with the microkernel residing in kernel space, while the rest of the OS and software stack resides in user space. This provides security and memory protection for vital low-level services. In addition, the OS places each application into its own separate address space that isolates them from the OS and each other for security and reliability. The Security Layer helps an IT department manage its smartphones, allowing an enterprise to lock or wipe a lost smartphone.

The Symbian OS has undergone extensive field-testing, having evolved from the 32-bit EPOC OS in 1994. The Nokia S60 Platform uses the latest Symbian OS v9, which has a EKA2 real-time kernel. The real-time capability is required to properly manage a device's telephony and multimedia functions. The Symbian OS has a plug-in framework that enables the easy addition of new peripherals, because their drivers and supporting frameworks can be "snapped" into the system without having to modify the OS or other frameworks. A client-server mechanism provides access to low-level system resources, and in fact the kernel itself is a server that parcels out resources to those applications that need them. This transaction scheme allows applications to exchange data without requiring direct access to the OS space.

Tools for S60 Platform Development

There is something just about for everyone to write S60 Platform applications. The platform supports several programming languages, notably C/C++ for porting existing UNIX applications, and Java to port Java ME MIDlets. As mentioned previously, the software stack offers several run-times that offer application development using WRT widgets, Flash, and Python.

The primary programming language for the platform is Symbian C++, which meshes with Symbian's object-oriented interfaces and frameworks. You use Carbide.c++, an Eclipse-based IDE and toolset, to write and debug Symbian C++ code. Symbian C++ has special language idioms for embedded system support, such as a clean-up stack. One the negative side, these idioms and the language's behavior makes for a steep learning curve with the language, although this is no different than learning Objective-C for the iPhone. One other complication is that over the years the platform has accumulated hundreds of API classes and huge number of methods. It takes time to sift through these when learning to write a S60 Platform application.

The platform also supports Open C/C++, which implements a vendor-neutral C programming interface. Open C's runtime consists of an implementation of selected POSIX libraries, while Open C++ uses STL/Boost libraries. These libraries allow ports of Linux applications to the platform. Using the Open C SDK, the Carbide.c++ IDE can be used to write Open C/C++ programs. The SDK can also be used with GCCE and RVCT compilers.

Python language support is available as an installable runtime. Python is valuable as a rapid prototyping environment, and it can be extended to function as a code wrapper that invokes S60 Platform APIs.

WRT widgets can be written using any web authoring tools. A WRT widget is essentially a web page containing HTML and ECMAScript, stored in a .zip file. The widget's markup language and scripts execute locally on the phone. Nokia has developed a plug-in that works with Aptanna's Studio, a development environment used to debug HTML, Javascript, CSS and Ajax code. In latest release of S60 platform, WRT widgets can, through Javascript extensions, access the phone's contacts list or location API directly, to make simple yet useful lightweight applications.

Java ME development can be done with the usual suspects: either Eclipse or the NetBeans IDEs. The Runtimes layer implements the Java ME profile/configuration MIDP 2.0/CLDC 1.1.

Once you've completed that killer mobile app, those programs written in Symbian C++ and Open C/C++ are packaged as SIS files. Symbian SIS files contain installation metadata, program code, and resources. The smartphone's software installer reads the metadata to determine if the application requires specific hardware that might be absent on the device, such as an accelerometer or Bluetooth. The installer can also perform a security check at this time.

For the S60 Platform, the SIS file must be digitally signed. This is required by Symbian OS v 9 for the security check and trusted code mechanism to work. Security certificates can be used to permit or block application execution. Such certificates can be used by the enterprise to control in-house mobile applications, or by the network operator to manage smartphone features or access to network services.

S60 applications can be distributed over-the-air (OTA), or via Bluetooth, or PC connectivity software. Handango has managed the wide-scale distribution of Nokia applications. In February, Nokia announced plans to launch its Ovi Store, which sells applications, videos, games, pod-casts and other content, similar to Apple's App Store. The store will be accessible by Nokia S60 smartphones in May. Nokia will also offer developers seventy percent of the reveue from sales.

Finally, the Symbian Foundation will take on the governance of of Symbian and Symbian-based platforms such as S60 Platform, and move them to open source over the next two years. The source code for these platforms will be available to developers for free.

S60 Platform Summary

Pros:

  • Nokia has the largest smartphone market share.
  • The S60 Platform has a diverse set of languages and tools to develop applications, ranging from industrial-strength C and C++, to Python scripts for prototyping, to web-based WRT widgets.
  • Good enterprise support.

Cons:

  • Non-standard Symbian C++ has steep learning curve, with special idioms to master.
  • Large number of Symbian APIs to learn, since it contains hundreds of classes and thousands of member functions.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 
Dr. Dobb's TV