Symbian development general notes

From MoDe

Table of contents

1 Back

Why use C++

  • you're masochistic
  • you need full access to the phone's APIs
  • you want to develop middleware libraries
  • need the speed (e.g. computer vision algorithms)
  • Can't do it in Java.
  • Can't do it in Python
  • You like really bizarre naming conventions.

Why not use C++

  • Can do it in Java or Python
  • Can't handle the ridiculously insane learning curve

From the Series 60 Developer FAQ (http://www.forum.nokia.com/ndsCookieBuilder?fileParamID=5288) (don't bother reading it, it's mostly useless):

5.2.1 Is standard C++ used for application development?
The C++ language used in the Series 60 Developer Platform has been optimized
for small devices with memory constraints. The Standard Template Library (STL)
is not supported, and other changes to standard C++ have been made. Symbian
native applications are developed using Symbian’s own version of C++, which
utilizes most of the C++ idioms but has a unique nomenclature. ANSI C is
supported but is rarely required.

translation:

5.2.1 Is standard C++ used for application development?
We don't have the effort to support the STL, bugger off.  We have our own
crapped out version of C++ that's just different enough to make writing code a
huge pain in the ass.  Our own unique nomenclature means you have to throw out
all your code because we're too lazy to implement the ISO C++ standard.  We did,
however, decide to throw you a bone and give you ANSI C because it took like four
lines of code to implement.

Why we don't like Symbian C++

  • confusing naming conventions almost as bad as Hungarian Notation
  • no static or global variables allowed.
  • try/leave instead of try {} catch {}
  • confusing conventions for dealing with memory errors. Construct, ConstructL, New, NewL, new, ::blink:: ::blink:: ::confusion:: ::blink:: ::blink::
  • royal pain in the ass to work with strings (TDes8, TDes16, TDes, TDesC8, TDesC16, TDesC, TBuf8, TBuf16, TBuf, TBufC8, TBufC16, TBufC, ad infinitum)

In defense of Symbian C++

Like the streets of Boston, once you learn it, it starts to make sense.

  • The Active Object model for concurrent programming eliminates many of the difficulties associated with multithreaded programs.
  • Descriptors are a pain, but the consequences are (1) strings are inherently international (2) data can be passed across process boundries (no need for data marshalling stubs).
  • There is a convention for dealing with memory errors, which is not normally found as a integral part of the platform.
  • Symbian devices are selling at a rate of about one million devices per month.

Getting Started

Look on Forum Nokia Symbian (http://forum.nokia.com/symbian) for the document "Symbian OS: Getting Started with C++ Application Development". here (http://www.forum.nokia.com/ndsCookieBuilder?fileParamID=3919) is a direct link, which will probably break soon.

GUI programming

The situation for GUI programming has improved vastly during the last year. There are now documents on http://forum.nokia.com which explain how to program each of the S60 GUI controls (lists, grids, dialogs, ...).

  • Nokia Carbide C++ V1.0 Express is free from http://forum.nokia.com and has an application generator that creates an initial template application. It now compiles to a .SIS file (installation file) or to an emulator debug image. V1.1 "Developer" has on-device debugging for N-Series and E-Series devices (aka S60 3rd edition).
  • Suggestion: Modify one of the example programs.
  • "Developing Series 60 Applications : A Guide for Symbian OS C++ Developers" (Leigh Edwards, Richard Barker) is the best book for GUI programming.
  • Borland Builder X has not been maintained and is now obsolete.

Vision / Image Processing

You can download a camera plugin to the SDK, which includes support for camera use (both still and video imaging). There are also example applications. You can find installation instructions here (http://graphics.csail.mit.edu/~kapu/symbian.html).

By default you are stuck with the default video clip in the emulator. If you want to replace the video clip with your own, the link above provides a tool for that.

Bluetooth programming

Links

Back

Back to Nokia Series 60