Factors to Consider When Choosing Runtime/Language for Windows Desktop Applications

desktop-developmentjavanet

My users all have Windows. Some of them use Linux or a Mac, but if they do they're generally capable of using something like Mono, Wine, Parallels or dual-boot.

My development team (including myself) has extensive experience both in writing
Swing applications in Java as well as Windows Forms in C#. "Extensive" means we've developed and shipped over three applications on both runtimes. The applications are technical analysis applications, so mild on database interaction, but heavy on custom UI and data set sizes.

We're coming to the point where we really want to make a decision as to which platform to focus on from now on, since it's becoming a burden to support both (if you're working in Swing for half a year it's too much hassle to get used to Windows Forms again and the other way around) and we want everyone in our team to be capable of working on all of our applications.

  • Windows Forms generally takes less work to make recognizable Windows applications. No amount of skinning and custom controls in Java has solved that over the years. At the same time, we've never had a customer that couldn't use the Swing applications.
  • Java used to have a much richer ecosystem in terms of libraries and automated build tools, but that's changing rapidly (Java is not going down, it's more that .NET is catching up).
  • For the rare case that multiplatform is preferred, Java beats .NET hands down. Mono is wonderful, but it's still more work than Java.

If we choose .NET we can start to focus on WPF, but also start using F#. If we choose Java, we can start to focus on RCP, but also start using Scala.

Has anyone had to make a similar decision? If so, what was it and what influenced you the most? Any top concerns I'm missing?

(Please note: there are some similar questions on Programmers.SE already, but they're either unconstructive or from a different angle.)

Best Answer

We went for Java (Swing) plus some native parts via JNI. While the commercial demand for multiplatformness may be marginal today, the situation may be different in 5 years, and the app's (a scientific measurement app) life cycle is going to be more like 10+ years (its C++ predecessor, still used today, has source files dated 1991). As you wrote, Java beats .NET hands down in non-Windows environments, and if we ever need to switch away from Windows, it's just a matter of re-compiling some native parts, maybe fine-tuning the GUI looks, and checking that everything works.

If you're sure you'll be Windows only, and your app is going to live just few years, then .NET may be preferred - it looks and behaves more like a native app because it is. But as a long term investment I trust Java more. Swing may look a little less than perfect, the start-up time may be longer, everything is a bit sub-optimal because of the multiplatform abstraction layer, but at least it "just works".

Related Topic