Gentlemen, start your toolkits (Ep. V: The Flamewar Strikes Back)

Note: tru just blogged about this subject, so I’m adapting my original draft and replying to tru’s post.

All graphical application projects face the dreaded perspective of endless flamewars about technical choices, and XMMS2 clients haven’t been spared:

What language to write the client in? What toolkit to use? What platform to support? Where to put the opening curly brace?

In fact, this freedom of choice seems to always have been one of the major obstacles to the creation of an official GUI client.

At FOSDEM ‘09, perhaps helped by the virtues of IRL discussions (and all the great food & beer), we had a debate about the pros and cons of all possible combinations and came up with a reasonable proposition that should hopefully suit most interested developers in the XMMS2 community.

Because we don’t want to require users to install unusual graphical toolkit libraries (good morning Rasterman), GTK+ and Qt are the only two obvious choices, with GTK+ having the slight advantage of being more widely installed in the GNU/Linux world. However, nobody really contests the claim that Qt is a superior API in terms of design.

One important argument brought into the discussion was platform support. In line with the XMMS2 Vision, we want to respect the users’ freedom to choose their OS by making the official GUI client run on a wide selection of systems, at least GNU/Linux, MacOS X and Windows. In the current state, GTK+ integration in MacOS X simply isn’t good enough, and given the new Qt licensing as fully Free Software, the Qt toolkit is the most appropriate choice.

The other touchy subject is obviously the programming language. Most people agreed that using high-level interpreted languages would make for a more dynamic and simple development process. The most popular contestants for the code throne are Python and Ruby, with Python more widely used and installed on GNU/Linux.

Either choice would require bundling the runtime with the client on proprietary platforms. A recent article on Ars Technica analyzed the deployment of PyQt apps on Windows and OS X, and while it seems reasonably good on Windows, the OS X support was quite lacking according to the author.

An alternative solution suggested by DraX was to develop the client QtScript, which is the ECMAScript (think JavaScript) implementation embedded in the newer Qt. It remains uncertain, however, how much can be done purely in QtScript and where are the limits, both in terms of performance and design limitations. tru hinted at it, but I think it’d still be worth investigating and experimenting before we draw final conclusions.

If QtScript was too limited, we’d have to rely on more C++ code (which is somewhat annoying for rapid development) or switch to Python (which isn’t particularly my language of preference, as some may know). In case of a draw, it might also simply be up to the people who start working on the project, including a potential Google Summer of Code student with XMMS2!

As tru suggested, it’d probably be best to use the native C++/Qt XMMS2 bindings, and stabilizing them could be part of the preparatory work for this project (and a good motivation).

In short, the current idea is to write the new XMMS2 client using Qt and C++/QtScript or possibly PyQt, and to have it available at least on the main desktop platforms (GNU/Linux, MacOS X, Windows). Discussions still open, but avoid feeding the trolls please.

5 responses to “Gentlemen, start your toolkits (Ep. V: The Flamewar Strikes Back)

  1. paurullan says:

    I know I am not into xmms2 but I will make my comment nonetheless: I truly believe the PyQt way is smarter. I do not if OSX support will improve over time but the development speed will be a lot faster than programming in C++.
    If PyQt does not seem a good way I think Ruby+Qt should be studied. But I would always go for the higher-than C++ level.

  2. theefer says:

    Oh I fully agree that we shouldn’t rely on C++ exclusively. The solution I suggested was more focused on using as much QtScript as possible. I’m quite seduced by this idea because I like ECMA/JavaScript, and I find it exciting to (ab)use it for making a desktop application. Now it will depend on how much we can get out of it, if really too little, we might have to look elsewhere indeed.

    QtRuby works quite well, although I don’t know how easy it is to deply in various OSes, and it’s quite probable that users of Free OSes will complain about a slightly more exotic dependency than Python.

    Thanks for sharing your thoughts.

  3. paurullan says:

    Do not mind about the users complaining: they will always do. It is distro’s job to make the packages so users do not have to know the dependencies.

    I have never typed a line of JavaScript, so I cannot say how good the idea is. I work with python and ruby, so both I support both of them.

    For me the most important thing is to have remember that it has to be fun to code this client. Languages and toolkits are just tools; fun is a motivator.

  4. insomnia bytes » Blog Archive » Going beyond tracks and local data (Ep. VII: Return of the GUI) says:

    [...] Gentlemen, start your toolkits (Ep. V: The Flamewar Strikes Back) [...]

  5. insomnia bytes » Blog Archive » Embrace the community (Ep. I: The Fandom Menace) says:

    [...] Gentlemen, start your toolkits (Ep. V: The Flamewar Strikes Back) [...]

Leave a Reply