XULRUNNER 是否适合替代其他 C++ QT等桌面应用程序框架?

发布于 2024-08-28 22:56:54 字数 371 浏览 3 评论 0原文

XulRunner/Gecko 似乎对于开发 GUI 密集型应用程序非常有趣(通过使用广泛使用的技术,例如 HTML / CSS / SVG / XUL / Javascript)。但底层的 C++ APIS(XPCOM、NECKO 等)看起来又老又复杂。此外,文档/开发工具的普遍缺乏确实令人恐惧。

另一方面,QT 有一个相当好的平台,并且有很好的文档和支持。 UI 部分确实很“传统”。

您对 XULRUNNER 的体验如何,特别是与其他 C++ 桌面应用程序框架(例如 QT/GTK/MFC...)相比?缺什么?什么是了不起?

附带问题:如果我想将现有的 MFC 应用程序迁移到跨平台 C++ 桌面应用程序框架,使用 XULRUNNER 而不是 QT 或 GTK 是否明智?

XulRunner/Gecko seems to be really interesting for developing GUI-intensive applications (by using widely used technologies such as HTML / CSS / SVG / XUL / Javascript). But the underlaying C++ APIS (XPCOM, NECKO, ...) looks so old and complex. Moreover the general lack of documentation/developper tools is really frightening.

On the other hand, QT have a quite nice platform, and is well documented and supported. The UI part is really "traditional" though.

What are your experiences with XULRUNNER, specially compared to other C++ desktop applications frameworks such as QT/GTK/MFC...? What is missing? What is awesome?

Side question: If I wanted to migrate an existing MFC app to a cross platform C++ desktop application framework, would it be wise to use XULRUNNER instead of QT or GTK?

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

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

发布评论

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

评论(5

爱格式化 2024-09-04 22:56:54

说实话,我只是不同意那里没有很多 XULRunner 应用程序...有很多负载,这些只是 Mozilla 知道的一些应用程序:

https://developer.mozilla.org/en/xulrunner_hall_of_fame

developer.mozilla.org/en/List_of_Mozilla-Based_Applications

这当然不包括 Firefox 和 Thunderbird 本身!

我们自己的平台列在 www.redbacksystems.com/liaison/ 上,

我从 2003 年左右就开始在这个平台上进行开发,我很喜欢它,因为我现在绝不会在任何其他平台上进行编程。

当您可以使用符合简单标准的 JavaScript/ECMA(包括 E4X)编写并具有出色的 CSS 和 XML 支持(包括 XBL(尽管是 1.0)、RDF、XML 模板、远程更新、插件和扩展支持等等等等,甚至不让我开始了解地理位置或本机 SQL 支持。

如果您无法在几天内引导一个相当完整的 XULRunner 应用程序,那么您可能遇到了严重错误。无论您的部署平台如何,都需要进行任何其他编码工作。

对我来说,Mozilla 工具包是首选平台。

顺便说一句,据我了解,Joost 面临着特定的挑战,因为他们正在编写/实现自己的视频渲染并尝试对内容进行 DRM。

To be honest, I just don't agree there aren't many XULRunner apps out there... there are loads, these are just a few of the ones Mozilla knows of:

https://developer.mozilla.org/en/xulrunner_hall_of_fame

developer.mozilla.org/en/List_of_Mozilla-Based_Applications

This of course excludes Firefox and Thunderbird themselves!

Our own is listed there www.redbacksystems.com/liaison/

I have been developing in this platform since about 2003 and I love it, given the choice I would never program in any other platform now.

Why on earth would you want to write in QT or GTK when you can write in simple standards compliant JavaScript/ECMA including E4X, with exceptional CSS and XML support - including XBL (albeit 1.0), RDF, XML Templating, remote updating, plugin and extension support etc etc etc, and don't even start me on geo-location or native SQL support.

If you can't bootstrap a fairly complete XULRunner app within a few days, then you probably have something badly wrong. Any other coding effort will be required irrespective of your deployment platform.

For me, the Mozilla toolkit is the platform of choice bar none.

BTW, as I understand it Joost had specific challenges as they were writng/implementing their own video renderes and attempting to DRM content too.

我们的影子 2024-09-04 22:56:54

据我所知,实际上使用 XulRunner 构建的应用程序并不多。我应该知道,因为我是其中之一的技术主管,我们试图聘请有经验的人。事后看来,这并不令我感到惊讶。我们决定使用 XulRunner 是由一位非开发人员违背我的建议做出的。许多事情花费的时间是我们之前使用的 wxWidgets 中的两倍。现在我也在其他项目中使用了Qt,我不得不说它甚至比wxWidgets更好。因此,我可以相当可靠地声明,Qt 的效率将是 XulRunner 的两倍以上,而且您将更容易地找到经验丰富的开发人员。

当然,XulRunner 中的 Javascript 很好。但 Qt 还附带了 QtScript,它包装了 JavaScriptCore。当涉及到构建真正丰富的 UI(即不仅仅是一堆图像)时,HTML+SVG+CSS+JS 就不够了。它们的开发是为了让简单的事情变得容易,而不是让复杂的事情成为可能。只需查看最新功能视频即可。 HTML5 的解决方案:一个标签,让一些幕后的 C++ 代码来做真正的工作。尽管视频只是一次显示一大堆图像。

所以,问题不在于缺少一些东西。只是发展慢,出成果也慢。

从令人敬畏的一面来看,插件机制实际上运行得很好。

现在,如果您从头开始,这一切都适用。如果您已经拥有大量 MFC/C++ 代码,请坚持使用 C++ 并仅删除 MFC 部分。这意味着 Qt 或可能的 wxWidgets 是明显的赢家。

There aren't actually that many applications built using XulRunner, as far as I'm aware. And I should know, as I was Tech Lead for one of them and we tried to hire experienced people. In hindsight, this doesn't surprise me. Our decision to use XulRunner was made by a non-developer, against my advice. Many things took twice the time they would have taken in wxWidgets, which we used before. Now I have also used Qt in other projects, and I'd have to say it's even better than wxWidgets. So I can fairly reliably state that Qt will be more than twice as efficient as XulRunner, and besides you will have a much easier time finding experienced developers.

Sure, Javascript in XulRunner is nice. But Qt also comes with QtScript, which wraps JavaScriptCore. And when it comes to building truly rich UI's - i.e. more than just a stack of images - then HTML+SVG+CSS+JS just don't cut it. They were developed to make simple things easy, not to make complex things possible. Just look at the newest feature, video. HTML5's solution: a tag, and let some C++ code behind the scenes do the real work. Even though video is just a big stack of images shown one at a time.

So, the problem isn't so much that there are things missing. It's just that development is slow, and the result is slow.

On the awesome side, the plugin mechanism actually works quite well.

Now, this all applies if you start from scratch. If you already have a lot of MFC/C++ code, stick with C++ and drop only the MFC part. That means Qt or possibly wxWidgets are the obvious winners.

若水般的淡然安静女子 2024-09-04 22:56:54

我认为您不想用 C++ 实际编写 XUL 代码。 XPCOM 等 API 的目的是让您可以与现有的 C 库进行交互,或者如果您需要编写需要调用 javascript 引擎外部的 API 的特定于平台的内容。

如果您想用 javascript 编写跨平台 GUI 应用程序,那么它可能就是您正在寻找的。

I don't think you'd want to actually write XUL code in C++. The purpose of the XPCOM, etc APIs is so that you can interface with existing C libraries or if you need to write platform specific stuff that requires calling to APIs outside the javascript engine.

If you want to write a cross-platform GUI app in javascript though it might be what you're looking for.

想你只要分分秒秒 2024-09-04 22:56:54

我不在该团队中,但 joost 桌面应用程序使用 XULRUNNER 作为 UI。虽然这是一个选项,但我个人不会用跨平台 GUI 来碰它。事实上,我的经验表明,拥有一个跨平台应用程序总是不够理想。

我的建议:拆分您的核心应用程序功能,并为您需要的任何平台构建本机 UI。您将获得更好的用户体验。

I wasn't on the that team but the joost desktop application was using XULRUNNER for the UI. Although it is an option I personally would not touch it with a stick for cross-platform GUIs. In fact my experience shows that having a single cross-platform app will always be subpar.

My suggestion: split out your core app functionality and build native UIs for whatever platform you need. You will get a much better user experience.

2024-09-04 22:56:54

有人尝试过这个吗?

XUL 查看器
http://code.google.com/p/xulwin/

这是一个非常棒的项目。干净的代码,很少的依赖项(只有 poco-basic 和 boost)

哇!

Did anyone try this?

XUL Viewer
http://code.google.com/p/xulwin/

this is pretty amazing project. clean code, few dependencies (just poco-basic and boost)

Woot!

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