Qt 还是 Symbian C++?

发布于 2024-08-19 11:14:18 字数 1431 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

拥有 2024-08-26 11:14:18

Symbian C++ 是 C++ 的方言,从内核到应用程序框架都是用 C++ 编写的。它在许多方面与标准 C++ 不同,此处列出了其中一些:

  • 不使用异常; Symbian 使用自己的堆栈展开方法,称为“leaves”。主要原因是Symbian创建时C++标准仍在开发中,当时编译器还没有广泛支持异常。
  • 由于缺乏对异常的支持,动态分配的内存的管理使用称为清理堆栈的专有机制。
  • 虽然 STL 的端口现在可用于 Symbian,但这是最近的开发,因此该操作系统有自己的字符串、数组、散列等实用程序类。

总而言之,这些会使学习 Symbian C++ 变得相当困难,即使对于经验丰富的 C++ 来说也是如此程序员。尤其是清理堆栈和字符串类(称为描述符)通常会给 Symbian C++ 开发增加相当多的开销。

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

Qt 旨在解决上面列出的一些问题,这些问题往往会阻碍人们在 Symbian 操作系统上进行本机开发。具体来说,它支持更现代的 C++ 编程风格,并包含一组非常先进的图形/UI 库。今天,Qt 可以在最新的 Symbian 设备上安装。展望未来,它将构成一个全新应用程序框架的基础,该框架将在 平台的 S^4 版本中引入(预计用于 2011 年发货的设备中)。

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

这个功能差距正在由一个名为 Qt Mobility 的项目解决,该项目将引入涵盖以下内容的 Qt 库:位置、消息传递和 PIM 等领域。

总而言之,如果您是 Symbian 新手,Qt 是值得学习的应用程序开发环境,这样做的额外好处是您还可以在其他平台上开发 Qt 应用程序(因为它是跨平台工具包)。

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

落墨 2024-08-26 11:14:18

去Qt吧。这将是整个诺基亚的发展方向。另外,您的程序也可能会在 Maemo/Meego 上运行。

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.

娇俏 2024-08-26 11:14:18

有 7 个可用工具包的比较 -Symbian C++、Qt、Open C\C++、Python、Widgets、Java ME、Flash Lite - 此处:运行时空间的 Hitch Hikers 指南

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

定格我的天空 2024-08-26 11:14:18

答案有点晚了,但以下内容来自诺基亚开发者 wiki 上的 Symbian C++

Symbian C++ 是 Symbian 的本机编程框架,是一个
针对低内存设备优化的 C++ 惯用变体。虽然 Qt 是
现在推荐的创建 Symbian 应用程序的本机框架,我们
继续提供对使用 Symbian C++ 的工具的访问。这
持续的支持使您能够维护遗留应用程序和
将它们迁移到最新版本的 Symbian 平台。

听起来现在Qt是首选,新项目应该使用Qt。

The answer is a bit late, but here's from Symbian C++ on the Nokia Developer wiki:

Symbian C++, the native programming framework for Symbian, is an
idiomatic variant of C++ optimised for low memory devices. While Qt is
now the recommended native framework creating Symbian apps, we
continue to provide access to tools for working with Symbian C++. This
continued support enables you to maintain legacy applications and
migrate them to the latest versions of the Symbian platform.

It sounds like Qt is now preferred, and new projects should use Qt.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文