views:

872

answers:

3
+11  Q: 

Qt or Symbian C++?

I am planing to develop on Symbian systems but I am not familiar with it. I know (might be) the most popular way of developing on Symbian is Symbian C++, and I also heard of Qt. What's the difference between them? If I want my app run on most of the Symbian systems, which should I choose? Can someone give me some overall advices?

Thank you~

+22  A: 

Symbian C++ is the dialect of C++ in which the operating system is written, all the way from the kernel up to the application framework. It differs from standard C++ in a number of ways, some of which are listed here:

  • Exceptions are not used; Symbian uses its own method of stack unwinding called 'leaves'. The main reason for this is that the C++ standard was still in development when Symbian was created, and exceptions were at that time not widely supported by compilers.
  • Because of the lack of support for exceptions, management of dynamically allocated memory uses a proprietary mechanism called the cleanup stack.
  • Although a port of the STL is now available for Symbian, this is a recent development, so the OS has its own utility classes for strings, arrays, hashes etc.

Taken together, these can make learning Symbian C++ pretty difficult, even for seasoned C++ programmers. The cleanup stack and string classes (known as descriptors) in particular are usually seen to add quite a lot of overhead to Symbian C++ development.

As with any operating system, in addition to needing to know the native language, you also need to know your way around the libraries which are relevant to your area of development. Symbian has a very rich set of libraries covering large amounts of functionality (threading, IPC, graphics, multimedia, networking, location, messaging, PIM, telephony etc.) Once you get used to the Symbian C++ idioms, these libraries are generally very powerful and offer a feature set at least equal to other platforms. One notable exception is the UI library, known as Avkon, which is now pretty dated when compared to corresponding frameworks on other platforms.

Qt is intended to address some of the issues listed above which tend to put people off native development on Symbian OS. Specifically, it enables a much more modern style of C++ programming, and includes a very advanced set of graphics / UI libraries. Today, Qt is available for installation on most recent Symbian devices. Looking forward, it will form the foundation of a completely new application framework, which will be introduced in the S^4 version of the platform (expected to be in devices shipping from 2011).

One thing I should point out is that, at this point, Qt does not cover all of the functionality of the native libraries. From the list above, while Qt offers abstractions of threads, IPC, graphics, multimedia and networking, its core libraries do not include location, messaging or PIM functionality. So, while you can use Qt to write (for example) an FTP client, a drawing program or a media player, you cannot use it to write a messaging client. Because Qt is C++, you can mix it with native Symbian C++ (dropping down to platform APIs to access messaging for example), but this is somewhat complex.

This functionality gap is being addressed by a project called Qt Mobility, which will introduce Qt libraries covering areas such as location, messaging and PIM.

In summary, if you are new to Symbian, Qt is the application development environment to learn, and doing so has the additional benefit that you can also develop Qt applications on other platforms (since it is a cross-platform toolkit).

Gareth Stockwell
Thank you very much~ What about Java ME on Symbian?
Mickey Shine
My answer concentrated on native C++ development options, but Symbian also supports many other runtimes. Aside from Java ME, you can also develop in Flash, Python, WRT, .NET (with proprietary libraries), ... the list goes on ...
Gareth Stockwell
Thank you very much
Mickey Shine
Technically, exceptions are nowadays used - the TRAP/Leave mechanism is implemented in terms of try-catch and throw. This is something you need to be aware if you're mixing code using C++ exceptions and Symbian C++ with leaves.
laalto
avoid .Net for now since Red Five Labs has ceased its business activities. JavaME on symbian is a great idea since Nokia is one of the rare companies still investing in it to this day. For an introduction to Symbian OS C++ see http://www.quickrecipesonsymbianos.com
QuickRecipesOnSymbianOS
The Qt Mobility project added support for location, messaging and PIM. It will be included in the upcoming Qt 4.7 (or you can grab it for 4.6 separately if you want).
iconiK
+2  A: 

There is a comparison of 7 available toolkits -Symbian C++, Qt, Open C\C++, Python, Widgets, Java ME, Flash Lite- here: Hitch Hikers Guide to the Runtime Space

Comptrol
+4  A: 

Go for Qt. It will be the direction where all of Nokia is going. Plus your program will then probably run on Maemo/Meego too.

guruz