Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Programming languages

Symbian OS offers a choice of programming languages to the developer. This document describes the options.

C++

Symbian OS is written in C++, and this is therefore regarded as its primary programming language. C++ offers the greatest access to the Symbian OS APIs, and being the native OS language, the best performance in memory use and execution speed.

As well as being the typical language used for applications and libraries, its use is required for the following types of program:

The use of C++ for Symbian OS is targeted at suitability for phones, which means that some C++ standard functionality, such as C++ exception handling and the Standard Template Library, is not used. A good place to start to understand Symbian OS C++ usage is Essential idioms.

Java

Java is, in most cases, the main language to consider as an alternative to C++.

Symbian OS provides a MIDP (Mobile Information Device Profile) 2.0 implementation. MIDP offers a set of Java APIs that are specialised for use in mobile phones, for such things as user interfaces, persistence storage, networking, and applications. It runs in the context of the classes provided by the Connected Limited Device Configuration (CLDC), and uses the K virtual machine (KVM), a virtual machine specially designed for small mobile devices.

Symbian OS support for installation and execution of MIDP programs (MIDlets) is described in Java MIDP guide.

PersonalJava 1.1.1 and JavaPhone, provided in Symbian OS v6.0, were removed from the OS in version 7.0, though licensees may supply them in some v7.0-based products.

Assembler

For most purposes, C++ offers sufficiently high performance and enough low-level access to make the use of assembler unnecessary. Symbian OS uses it occasionally where performance is of the highest consideration, such as in the active scheduler (the main event handling and despatch loop).

C

C would not normally be considered for writing new Symbian OS programs, but may be a candidate when you have existing C code to port to Symbian OS. For this purpose, Symbian OS includes an implementation (with some omissions) of the C Standard Library.

Advice on porting C programs is available on the Symbian Developer Network.

OPL

OPL is a BASIC-like language that was supplied on Psion PDAs. It is now open source, and can be obtained for several recent phones and UI families.

Web/WAP scripting

Many Symbian OS phones have web or WAP browser applications that support scripting languages such as WMLScript and ECMAScript.

Other

If you have particular specialised language needs, for example Python, it is worth looking on DevNet and searching other resources to see if it has yet been implemented on Symbian OS.