Qt或Symbian C ++? [英] Qt or Symbian C++?

查看:235
本文介绍了Qt或Symbian C ++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算在Symbian系统上开发,但我不熟悉。我知道(可能)在Symbian上开发的最流行的方法是Symbian C ++,我也听说过Qt。它们之间有什么区别?如果我想我的应用程序在大多数Symbian系统上运行,我应该选择?

解决方案



div>

Symbian C ++是C ++的方言,操作系统是从内核到应用程序框架的。它与标准C ++在许多方面有所不同,其中一些在这里列出:




  • 不使用异常; Symbian使用自己的堆栈解开方法,称为叶子。这种情况的主要原因是,当Symbian被创建时,C ++标准仍然在开发中,而且当时的例外情况没有被编译器广泛支持。

  • 由于缺乏对异常的支持,动态分配的内存的管理使用称为清除堆栈的专用机制。

  • 尽管STL的端口现在可用于Symbian,但是这是最近的开发,



总而言之,即使对于经验丰富的C ++程序员来说,这些都会使Symbian C ++变得非常困难。清理堆栈和字符串类(称为描述符)通常被视为对Symbian C ++开发增加了很多开销。



与任何操作系统一样,除了需要知道母语之外,你还需要知道你的方式围绕着与你的发展领域相关的图书馆。 Symbian有一个非常丰富的库,涵盖大量的功能(线程,IPC,图形,多媒体,网络,位置,消息,PIM,电话等)。一旦你习惯了Symbian C ++成语,这些库通常是非常强大的并提供至少等于其他平台的功能集。一个值得注意的例外是UI库,称为Avkon,与其他平台上的相应框架相比,现在已经相当过时。



Qt 旨在解决上面列出的一些问题,倾向于将人们从Symbian操作系统的本地开发。具体来说,它实现了更现代的C ++编程风格,并且包括非常先进的一组图形/ UI库。今天,在大多数Symbian设备上, Qt可用于安装。展望未来,它将形成一个全新的应用程序框架的基础,将在S ^ 4版本的平台(预计在2011年发货的设备中)。



我应该指出的一点是,在这一点上,Qt并没有涵盖所有本地库的功能。从上面的列表,虽然Qt提供线程,IPC,图形,多媒体和网络的抽象,其核心库不包括位置,消息或PIM功能。因此,虽然您可以使用Qt编写(例如)FTP客户端,绘图程序或媒体播放器,但不能使用它来编写消息传递客户端。因为Qt是C ++,您可以与原生Symbian C ++混合使用(例如,下载到平台API来访问消息),但这有点复杂。



此功能差距正在由一个名为 Qt Mobility 的项目解决,该项目将引入覆盖诸如位置,消息传递和PIM之类的Qt库。



总之,如果你是Symbian的新手,Qt是应用开发环境,有额外的好处,你也可以在其他平台上开发Qt应用程序(因为它是一个跨平台的工具包)。


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~

解决方案

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).

这篇关于Qt或Symbian C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆