is XULRUNNER suitable as a replacement for other C++ desktop applications frameworks such as QT?
Asked Answered
P

5

14

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?

Pedropedrotti answered 13/4, 2010 at 20:15 Comment(2)
Heed the warning signs: XulRunner leads to a dead end. Turn around now before you're too heavily invested. I've developed a Firefox add-on in XUL before, and let's just say I'd rather not do it again.Bank
@10basetom, thank you for this important comment. I have asked this question 6 years ago, and at that time, it was still something to consider. Today it is clear that this is a dead end !Pedropedrotti
A
6

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.

Ashlieashlin answered 14/4, 2010 at 13:18 Comment(0)
B
8

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.

Balkan answered 22/6, 2010 at 8:42 Comment(1)
What are you going to do now that Mozilla's dropped Xulrunner and is deprecating XUL/XPCOM?Beamy
A
6

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.

Ashlieashlin answered 14/4, 2010 at 13:18 Comment(0)
A
2

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.

Apollinaire answered 13/4, 2010 at 20:21 Comment(0)
I
1

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.

Ignacioignacius answered 13/4, 2010 at 21:18 Comment(0)
S
0

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!

Sebastien answered 4/8, 2010 at 17:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.