23

I'm building an application for multiple desktop platforms: Windows, Mac, and maybe later for Linux.

I was wondering which programming language and IDE combination would be the best for me:

  1. Programming language need to be whether C# (preferred) or Java.
  2. Core libraries must be shared between all platforms, means all platforms must link to a single core library (by library I mean a list of classes and functions).
  3. Windows and Mac are in priority, Linux app is for future plannings.
  4. Design of the app is completely custom, it doesn't follow any guidelines of each platforms.

I'm stuck between these three solutions:

  1. Use Xamarin.Mac + Visual Studio for Windows and link the core classes between them.
  2. Use GTK# for the whole project and compile multiple builds for each platforms.
  3. Use Java for the whole project and compile multiple builds for each platforms.

For #2 and #3, I need an advice that which language is more suitable for me, considering the design of my application. I mean, which one has a better GUI building ability for my goal?

BTW GTK# uses different libraries for each platforms, so that should be an clutter for my core architecture, or not?!

GrahamMc
  • 3,034
  • 2
  • 24
  • 29
Hossain Alhaidari
  • 767
  • 3
  • 11
  • 24

7 Answers7

13

Three years later and Javascript is now also a strong contender in this debate.

There are multiple options within the space.

And others

Even Microsoft has shipped Visual Studio Code, the cross platform version of their development environment, which is written in Javascript.

What is the Visual Studio Code editor built on

The benefits include utilizing the many available web libraries, and building/using your web development skills.

Community
  • 1
  • 1
GrahamMc
  • 3,034
  • 2
  • 24
  • 29
  • 2
    Also take a look here: https://stackshare.io/cross-platform-desktop-development StackShare has a comparison of cross platform development options that you might find useful – GrahamMc Jul 05 '18 at 10:50
  • 1
    Have had some downvotes on this post and interested to know folks might feel so strongly that JavaScript is not a viable contender in cross platform development space! Maybe my answer could be better formulated? – GrahamMc Oct 09 '20 at 09:50
  • 1
    I didn't downvoted, but I strongly disagree: you cannot create a full very complex software in JS: the language is NOT structured enough, and you have the big disvantage of NO compile-time checks and not is strongly typed. Yes flexible and fully available a lot of frameworks, I think to excellent Quasar for example, but it's not suitable for a complex, big, desktop app. Also... an electron app is still to easily openable to do strange things. Of course, it's only my opinioni, but it's based (only) on my long experience, 20 years, of desktop, mobile and web deleoper – realtebo Dec 19 '20 at 11:27
7

This sounds like a job for Xojo or something similar: http://www.xojo.com

Mac, Windows, Linux builds with easy GUI design and native apps. Custom UI easily done also, and you'd then have one code base for all three platforms. You can download and use the software for free to develop and test, only requires a license once you decide to build your app.

mjdth
  • 6,536
  • 6
  • 37
  • 44
  • I'll also addd that Xojo uses an object-oriented programming language that is very similar to C#/Java (and it can make web apps). – Paul Lefebvre Jan 14 '14 at 15:14
2

You can also conside Livecode

Livecode: http://livecode.com For any platform except web, it is opensource and it includes mobile targets as well, if your code is flexible enough to not being C# or Java.

An option is to build the core logic in a compiled library using C# and GUI independence and then plug it to livecode, leaving the UI work for that tool.

merlucin
  • 473
  • 4
  • 8
2

"GTK# uses different libraries for each platforms", do you mean different rendering back ends (such as X11, Cairo)?

You only need to build your GTK# app once. However, you do have to bundle the GTK# runtime (which is different for Windows and Mac) with your app. Banshee is a good example you can follow.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
1

Probably your best bet is to use Nevron Open Vision. It is a cross-platform, C# based User Interface Platform, that implements most of the controls you need to build enterprise-ready applications. It is the framework behind MyDraw (www.mydraw.com) - a professional drawing program similar to Visio. MyDraw is built completely with Nevron Open Vision and does not require any other third-party libraries. We mainly develop it under Windows and just compile it to Mac. Soon we are going to add support for Linux and WebAssembly hosts.

1

Microsoft just launched .NET MAUI, a cross-platform GUI framework that builds on Xamarian.forms.

As we consider what building device applications will look like in a unified .NET, we see many devices across multiple platforms used, from Android and iOS to Windows and macOS. To address this need we are excited to announce a new first-class UI framework for doing just that: .NET Multi-platform App UI, affectionately call .NET MAUI.

This seems to meet all of your requirements. They do not explicitly mention Linux in their article, but claim to support it in the description on the Github Repo.

Zachary Canann
  • 1,131
  • 2
  • 13
  • 23
1

It depends on the audience of the app: Consumer mass market or business/IT

If its mass market consumer facing

Electron or native UI, perhaps with shared non-UI code. Visual Studio Code was made with Electron, for example (last I checked). Google Flutter is a new entrant worth evaluating. Dropbox is Python (or used to be). It is a lot of work (a) getting Python packaged properly for smooth x-platform install, and (b) GUI work will take a long time. Sadly, for mass market consumer apps (not utilities for IT people but beautiful designs for the masses like Dropbox, Skype) you will be spending a ton of time getting the installation system to work and getting the app to look and feel appropriate. This is an extremely time consuming endeavour no matter what path you take.

  • Consumer: Java? I don't think Java is a great fit for consumer desktop although I could be wrong. There are some Java packaging systems that are leaner/all bundled in. I'd also say JVM software companies tend to go under (more on this later). FreeMind the free mind mapper, is a good example of what can be achieved in Java.
  • Consumer: .NET? Yes, for the Windows side. Then use something native for Mac and shared libraries for non-GUI code. There is ".NET Core" aka Mono but its not fully matured at this time for Mac. Mono has been around for over half a decade and I haven't seen it mature for a consumer app. Ask: How many .NET Core apps are in the Mac app store? I hope it gets better but as of this writing (2020) there's very few notable ones.

Business app or IT tool

If its a basic business app or utility where a basic UI is okay, I'd evaluate Xojo and/or LiveCode mainly for comparison sake. Xojo is fairly close to .NET. Google Flutter as well since it's up and coming. By the time you read this, Flutter may be the best choice.

B2B: Java? This is a pretty tried, tested and true solution for "heavy" enterprise apps. You might not have end-users love you given Java apps tend to eat up memory. But for enterprisey apps the main concern is that the very intense business logic will work. For IT tools, it depends. If it's a 3-screen utility program, avoid Java. If it's a complex ERP then Java is good. Remember to look around for different packaging tools to avoid consumer headaches with the JVM. Again, one Java desktop app I like is Freemind. It's a great example of making a reasonable desktop app in Java. I have used it in both Windows and Mac and it's great. You can also look at Kotlin or Groovy (for test cases) which compile to Java byte code.

B2B .NET? There is so much to unpack here. The key is, in my biased view, .NET Windows desktop development is about 2X-4X faster development time than Windows Java desktop development. From making the GUI, to better code completion, to faster compile times, to less packaging and install snags. That said, at the time of this writing the ".NET Core" or Mono are pretty thin for MacOS. I really, really hope this changes. But I've been waiting years for Mono or .NET Core to provide a full suite for MacOS without the limitations and it hasn't yet happened. If it's an enterprise app, you might be able to get away with using .NET Core for Mac. But please first build a basic .NET Core "hello world" app with all the control/libraries you want to use. Then try building an installer for it on MacOS, and find someone random with a Mac to see if it actually installs and runs. You may find you're struggling in this area today (although I hope it gets better, it hasn't for years).

Overall Notes on Cross Platform

If this is a smaller app which doesn't need a fantastic UX and super-deep OS integration, then I'd consider Xojo or LiveCode, perhaps for the UX elements. Like @merlucin said, you can write the core logic in something shared- perhaps C#, python, etc.

Here's why- Xojo and LiveCode have been around for 10 years now. They are more about keeping things consistent. Whereas I find .NET and QT changes all the time. You have a lot of costs of keeping up with the Joneses and maintaining installers. So for a small app or utility- an XML editor, IT helper tool, Xojo or perhaps LiveCode will help you get there sooner.

When you hit the build button on Xojo, for example, it literally makes 3 executable files for Windows, Mac and Linux. Compare that to the madness of packaging a cross platform Python app, or even packaging a .NET app for Windows, to be honest.

The tradeoff is these tools- Xojo and LiveCode often end to be missing a few critical things you need, requiring a bit of a hack. You can read around their forums. Xojo is a bit like .NET although LiveCode is a different programming paradigm entirely based on "stacks".

Keep in mind developer happiness too. Many developers wont want to code in Xojo or LiveCode because they are lesser known languages. So ensure you get buy-in. What happens if you get laid off and have 5 years of experience in Xojo? Hmm.

In your evaluation, no matter what you choose-- you must compile a basic GUI app in the platform you're evaluating and get 3 people to install it correctly on a Mac. You'll be shocked at the libraries and madness needed. Especially if you're a web developer, you'd see that just maintaining installers is a ton of work across 3 platforms. Never mind GUI consistency.

SilentSteel
  • 2,344
  • 1
  • 28
  • 28