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.

2 comments:

  1. Wow, it's a great article...
    Could you please give a comparison about NetBeans and Eclipse? I'm new to this, but I'm using NetBeans. Because this IDE is fully supported by SUN..

    ReplyDelete
  2. Haqqi: ...and Sun is supported by Oracle.

    and Oracle has JDeveloper http://www.oracle.com/technology/jdev which is based on Eclipse SDK. ;-)

    Overall I prefer "Eclipse", but that's because I know how to get the best out of it. Note that "Eclipse" here is NOT plain Eclipse.

    NetBeans greatest feature is that it comes with a good starter package and overall stability+integration of its modules.

    Developing using Eclipse will take some time getting used to. There are several "kinds" of Eclipse, e.g. Eclipse Java EE "plain", SpringSouce Tool Suite, Oracle JDeveloper, JBoss Tools (for JSF).

    STS + JBoss does probably everything that NetBeans can do, and more.

    Some things NetBeans doesn't have is Mylyn and AspectJ support. And AspectJ is very useful in certain projects.

    ReplyDelete