Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Programming languages

Symbian OS offers a choice of programming languages to the developer. This page discusses 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 v7.0 provides a MIDP (Mobile Information Device Profile) 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, are not part of Symbian OS v7.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).

JavaScript

JavaScript offers client-side processing within HTML pages, and is typically used for validating user input, and offering dynamic page navigation. The Development Kit includes the engine for the Opera web browser, which supports JavaScript. If Opera is required by the product, licensees will provide a suitable UI..

WMLScript

WMLScript is the WAP scripting language, similiar in purpose to JavaScript, but used within a WAP Browser. The Development Kit does not include a WAP Browser, and licensees will provide one if required by the product. Until a licensee makes this available, WAP development can be carried out on a PC.

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 and in the Professional Symbian Programming book.

OPL

OPL is a BASIC-like language that was supplied on Psion PDAs. OPL is not supported by Symbian OS v7.0.

Other

If you have particular specialised language needs, e.g. Python, it is worth searching resources such as http://www.symbianpages.com/ to see if it has yet been implemented on Symbian OS.