Firefox: An Acceptable Cross Platform GUI Toolkit
ynniv.com
ynniv.com
Isn't it obvious? XUL is slow as molasses compared to GTK (or anything else.) There are desktop apps written on top of Mozilla. Miro is one that I use every day. I know the pain.
The perceived speed of Firefox itself depends mostly on the speed of web-page rendering, and not so much the chrome. So I guess Mozilla's focus has been to improve rendering speed, whereas Firefox's preferences dialog still reminds of me of trying to use Netscape 6 on a machine with 32 megs of memory back in 2001. Oh, the horror.
I hate to say this, but you know what I'd really like to see happen? For them to cut their losses. Just take everything in Komodo that's not tied to the XUL (or whatever Mozilla pieces they're using), and redo their GUI in ... well, there's more discussion on that in this HN thread: http://news.ycombinator.com/item?id=423119
That said, I think one of the advantages to XUL is that it allows for easy modifications and extensions. On the Firefox/Thunderbird front, that's worth it, but in some other cases, it might not be. I think even Amarok on Windows (when it works) uses less RAM than Songbird on Windows.
The reason is that when it came out it was competing with WinAmp 1.x which was the antithesis of sluggish.
SQLite (interoduced in FF3 for settings) calls fsync lots, hence tends to suck a bit on Linux. That's Linux's fault, not Firefox's.
Was FF2 preferences slow?
Cross-platform toolkits have a certain 'uncanny valley' of their own in this respect: only instead of rendering quality, it's native widgets. If you don't do native widgets, you're not going to look right. I have yet to see a toolkit do its own widgets that look like the originals.
I, for one, am too scared of the wicked complexity and large memory overhead to try developing a XUL-based app. But I've only done a Hello World.
Between bindings and scriptability built into some of the toolkits such as QT, there's almost nothing left unique to the XUL platform. You can see an example of that in http://labs.trolltech.com/blogs/2008/12/02/widgets-enter-the... around 2:40, where the script driving the little Nazi is actually the scripting language QT ships with based on Ecmascript.
So all this portability comes with a steep price of never really having a superb UI on your target platform.
Take a look at Songbird... it's been in development for many years and a lot of that is due to XUL. I'm pretty sure that had they chosen native widgets on each platform (GTK/Cocoa/MVC), they would have finished it faster and had a much better product overall.
But the lure of "write once, run everywhere" is an everlasting dream that almost never comes to a realization. Take Java for example... it still has platform specific quirks.
Did you mean MFC?
First, there is XULRunner and then there is bare metal XUL. XULRunner is a bit bloated and somewhat slower. If you want to go faster, then start from scratch. Second, you can't compare XUL to Qt/GTK simply because XUL is interpreted, not compiled - write once and run everywhere, for real. This is a huge advantage.
Regarding execution speed: XUL is JavaScript and is getting all these latest performance improvements we've all heard about.
And finally, unlike AIR, XUL can call native code fairly easily, so nobody stops you from including Win32, GTK or Cocoa components inside of XUL containers. Moreover, you can host Flash (we do) inside of XUL if you need multi-platform animation, video and other stuff Flash is good for.
Two reasons, I think, XUL is somewhat obscure is because all desktop development hasn't been exactly a hot topic in tech media lately and due to somewhat steep learning curve since XUL is essentially a supercharged HTML+JavaScript for desktop.
We also researched other options:
GTK doesn't really live well outside of Linux: it's Mac version is only starting to take off and it has stability issues on Windows.
AIR has very limited integration options with native OS. Can't even call a DLL if you need to, thus it's not really a desktop platform, but rather "Rich Web Platform".
Qt is also an excellent choice if you have an expertise of building/packaging C++ on multiple platforms, we picked XUL because of the ease of Flash hosting. Qt didn't support Netscape-style plugins at the time.
Also remember that xulrunner apps become instantly cross-platform because of their nature - think of all these other apps that you're comparing to and ensure you take that into consideration. Is Windows MP cross-platform with all the same features?
You get two toolkits for free -- standard HTML and you also get Flash/Flex.
(BTW, if you want to hack apps that look like true client-side app in HTML, check out the ExtJS kit. Amazing stuff. Well thought-out JS.)
(Some people care about free software, others don't. Just thought I'd mention an alternative)
The AIR compiler is also open source. The only thing that isn't open source in the stack is the flash player runtime, which executes the resulting SWF file. However, the SWF file format is open.
And you can run both (last I checked) in AIR as AIR contains WebKit.