简体   繁体   English

使用跨平台框架针对一个平台进行开发有哪些弊端?

[英]what are the disadvantages of using a cross-platform framework to develop for one platform?

Lately I've been contemplating whether I should start studying another framework since I only have a windows machine and I don't intend to make cross-platform software anytime soon. 最近,我一直在考虑是否应该开始研究另一个框架,因为我只有一台Windows机器,而且我不打算在不久的将来制作跨平台软件。 So to help me with that decision... 因此,为了帮助我做出这个决定...

  1. Is there any disadvantage to using a cross-platform framework when I don't intend to develop cross-platform? 当我不打算开发跨平台时,使用跨平台框架有任何不利之处吗? Intuitively I would say that a framework specialized for a certain platform would perform better in said platform than a cross-platform framework. 直观地说,专门针对某个平台的框架在该平台上的性能要优于跨平台框架。 But I am just assuming that. 但我只是假设那样。

  2. Please enumerate frameworks and libraries that I can start studying for rapid application development on Windows using C++. 请列举我可以开始研究的框架和库,以便使用C ++在Windows上进行快速的应用程序开发。 One with lots of documentation is preferred. 首选具有大量文档的软件。 I would appreciate it if you included a link that can help me get started. 如果您提供了可以帮助我入门的链接,我们将不胜感激。

Is there any disadvantage to using a cross-platform framework when I don't intend to develop cross-platform? 当我不打算开发跨平台时,使用跨平台框架有任何不利之处吗?

It depends on the framework. 这取决于框架。 Most frameworks limit themselves to functionality which is available across all platforms, which may limit you somewhat. 大多数框架将自身限制为可在所有平台上使用的功能,这可能会对您有所限制。 You may also not be able to take advantage of the best features of a given platform or the best development environment on that platform. 您也可能无法利用给定平台的最佳功能或该平台上的最佳开发环境。

Please enumerate frameworks and libraries that I can start studying for rapid application development on Windows using C++. 请列举我可以开始研究的框架和库,以便使用C ++在Windows上进行快速的应用程序开发。

A good option here is Qt . Qt是一个很好的选择。 It provides a very nice C++ based framework for Windows and other platforms. 它为Windows和其他平台提供了一个非常好的基于C ++的框架。 If you want Windows only, there are other options, including the Windows Runtime via C++ (for Windows 8 development), or the Microsoft Foundation Classes . 如果仅需要Windows,则还有其他选项,包括通过C ++Windows运行时 (用于Windows 8开发)或Microsoft基础类

By using a cross-platform framework, you will miss out on platform-specific frills, like programmatic control over Windows 7 Jump Lists . 通过使用跨平台框架,您将错过特定于平台的功能,例如对Windows 7跳转列表的编程控制。 Because of these things, it won't quite feel like a native application, but like a port of an application written for another OS. 由于这些原因,它不会感觉像是本机应用程序,而是像为另一个OS编写的应用程序的端口。 In many cases this doesn't matter. 在许多情况下,这并不重要。

A modern C++ framework built using templates isn't going to perform any worse simply because it's cross-platform. 使用模板构建的现代C ++框架不会因为跨平台而使性能变差。 You'll simply miss out on features that don't exist on multiple platforms. 您将简单地错过在多个平台上不存在的功能。

Generally the issue with cross platform frameworks are framework specific. 通常,跨平台框架的问题是特定于框架的。

eg wxWidgets - They are fast, but not too many GUI classes available. 例如wxWidgets-它们速度很快,但是没有太多的GUI类可用。 Documentation is not excellent however updated properly. 文档不是很好,但是已正确更新。

GNome - It is widely used but requires a heavy runtime deployment, bit more heavy in terms of memory usage. GNome-已被广泛使用,但需要大量的运行时部署,就内存使用而言,它会更加繁重。

These both are UI Frameworks. 这些都是UI框架。 both are GPL and hence you can use it. 两者都是GPL,因此您可以使用它。

Nokia Qt - It is an excellent cross platform framework and it is not just yet another UI but a complete framework for cross platform development. 诺基亚Qt-这是一个出色的跨平台框架,它不仅是另一个UI,还是用于跨平台开发的完整框架。 However, problem with Qt is metaobjectcompiler (mod). 但是,Qt的问题是metaobjectcompiler(mod)。 It is a kind of language extension. 这是一种语言扩展。

I would recommend that you opt QT as your next framework. 我建议您选择QT作为下一个框架。 It is being actively developed, lightweight, recently being open sourced and is available under LGPL lic. 它正在积极开发,轻巧,最近已开源,并且可以在LGPL lic下使用。

Just to second the other answers, Qt is a great framework (and is hopefully going to survive Nokia). 仅次于其他答案,Qt是一个很棒的框架(希望诺基亚能够幸免)。

Cross platform frameworks have mainly two disadvantages: performance (often they add another layer that is not necessary in native platforms) and of course being cross-platform, ie often not supporting functinality that is specific to your target platform. 跨平台框架主要有两个缺点:性能(通常它们会添加本机平台不需要的另一层),并且当然是跨平台的,即通常不支持特定于目标平台的功能。 With Qt, I never saw performance as a problem. 使用Qt,我从来没有将性能视为问题。 Also Qt brings in so many libraries that actually extend what you can do natively in Windows, that also the second point is not really a disadvantage here. Qt还引入了许多库,这些库实际上扩展了您可以在Windows中本地执行的功能,第二点在这里并不是真正的缺点。

The only problem with Qt is in fact the metaobjectcompiler (moc). Qt的唯一问题实际上是metaobjectcompiler(moc)。 In the beginning, you will stumble across some strange compiler errors, that come in the end from the moc. 首先,您会偶然发现一些奇怪的编译器错误,这些错误最终是由moc引起的。 Just remember this and google for the errors, you will get used to this. 只要记住这一点,并为谷歌的错误,你会习惯这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM