KDE vs Gnome and Java
February 20, 2007 4 Comments
I don’t want to quarrel about the pros and cons of each desktop. I think both are fine and we should stop whining at each other. However what I find a little disturbing is that applications typically are written for one or the other, but don’t work smooth on both. Evolution looks outlandish in KDE as does Konqueror in Gnome. That might not be a biggie for us techies, but a first time non-techie user would certainly be quite confused about the inconsistencies. So, can Java help us here and if so, then how?
Java has been designed from the beginning with platform independence in mind. I think it performs pretty well in this respect, arguably better than most alternative offerings so far. However, what is wasn’t made for is platform (desktop)-integration. Java has a bad reputation for beeing slightly out of place on most desktops. That’s even despite the fact that Java has one of the most flexible GUI toolkits, that actually _is_ designed to allow for platform integration via native look and feels. The problem so far has been that there was no really good native L&F until around JDK1.4 or JDK1.5. Only recently has the GTK L&F improved enough to be somewhat usable.
I’m thinking that when the native L&Fs get some more love, it would be possible to overcome the KDE vs Gnome (or whatever else) issue using Java and Swing. In Sun’s JDK (soon to be freed completely) we have a GTK L&F, which will become even better in future releases. Then there is a 3rd party KDE Look and Feel around, which is also looking pretty good even. So what we could see in the future is Swing applications always blending nicely with the user’s environment.
Let’s take for example a webbrowser. Say I’d beef up JGecko and wrap it up in a fully fledged web browser (which I would call ‘Firefrog’ for sure, a name I’d have proposed for Firebird back then, instead of Firefox). This would be started using the GTK L&F in Gnome, and thus would look just like any other Gnome app, especially when it could pick up the icon theme of Gnome. And when another user starts up the same app in KDE it would use the KDE L&F when this is installed. I think that barely any other toolkit can offer this kind of flexibility. Swing is really driving home here.
What’s needed for that is probably some kind of desktop detection and a means of choosing the correct L&F for that desktop (or fall back to Metal when none is found). I don’t know if that’s possible or if it makes sense at all. After all, a wrapper skript that appends the -Dswing.defaultlaf flag would do just as well.
And yes, I know that platform integration is more than GUI integration. I’m blatantly ignoring the other issues for now 😉 (and honestly, I think Java already offers good things in that area already, like CORBA, Webservices, XML etc).