Saturday, January 9, 2010

Cross-Platform Desktop Application Frameworks: Which One to Choose?


Desktop applications aren't dead yet, in my opinion. I still prefer email client, Twitter client, IM client, office apps, and many others on the desktop instead of using my web browser for that.

There are several desktop application frameworks for your development appetite, all with its own strengths and weaknesses. Which one is the best?

Java Desktop Application Frameworks


When looking at desktop application frameworks in Java, obvious choices are:
Java applications run on all major desktop platforms. It potentially runs on advanced mobile platforms, such as Nokia's Maemo, Intel's Moblin, and Google's Android.

I personally think Eclipse RCP is more powerful than NetBeans', and I'm not alone. You can see that from its usage on many commercial applications: SpringSource Tool Suite and JBoss Developer Studio among those.

The slight downside of Java is the user need to have Java Runtime installed. There are many ways to make this part of user experience much smoother.

C++ Desktop Application Frameworks


You can also go native, with C++ your choices are:
I have some experience with Qt development, and it's quite pleasant. Qt applications run on all desktop operating systems equally well, with initial support for Maemo, Symbian S60, and Windows Mobile (WinCE) mobile devices.

Most, if not all, KDE applications use Qt. Examples include the high profile Amarok music player, Kontact organizer, and KOffice desktop suite. Which proves Qt as suitable for complex applications.

Current Symbian devices can already run Qt apps with additional Qt runtime. Nokia featurephones and smartphones sometime in 2010 will have Qt support out-of-the-box.

Mozilla RCP is a higher-level framework than Qt, and powers an impressive portfolio of Firefox, Thunderbird, Sunbird, Songbird, Firefox Mobile (Fennec), and ActiveState Komodo.

Hybrid Web/Desktop Application Frameworks


If you love Web Technologies, these tools may be interesting to you:
Both alternatives have a similarity: they allow you to write applications with HTML, JavaScript, and CSS, with some proprietary JavaScript API for native functionality.

Titanium has an interesting advantage: apps can be run on iPhone and Android devices with Titanium Mobile.

Your code is potentially reusable for a web application frontend.

What about Mono?


I intentionally left out CLR (Common Language Runtime), more popularly known as the Microsoft .NET Framework. It's Java's most fierce competitor.

.NET has varying degrees of support in different platforms. Windows has the best support, followed by Linux and Mac OS X using Mono implementation, then Windows Mobile devices with .NET Compact Framework.

If you develop using Visual Studio 2010 (in Beta as of this writing), for example, you app will most likely not run under Linux. Add to that the continuing licensing issues. So I don't consider it "cross platform enough".

Anyway, I loved the C# programming language.

So, The Answer is...?

My conclusion is, it depends on your use case. I have a few suggestions though:
  • If it's a complex desktop application, go with Eclipse RCP. It will be more maintainable in the long term, and your Java code should be reusable.
  • If any of these is important to you: reusing code across platforms, Nokia devices, you love C++, you want as native as possible, seamless installation, small footprint; go with Qt.
  • If you love working with web technologies, and/or your application deals more with fluid user experience than processing data locally; go with Titanium Desktop.
What's your preferred framework?

Get Started with Eclipse RCP

To get started developing rich desktop applications with Eclipse RCP, grab the book Eclipse Rich Client Platform, Second Edition.