How to write applications for different platforms? Linux, Mac, Windows and Mobile Platforms

Eliasdx picture Eliasdx · Mar 15, 2011 · Viewed 8.1k times · Source

We want to write a client for an online service which should be available on as many platforms as possible. This question is about what programming language and framework we should use to create this client. These platforms are required: Linux, Mac, Windows, iOS (iPhone, iPod, iPad) and Android. The more the better.

For the mobile platforms there is Titanium Mobile. I haven't tried this thing yet, the website says you can develop for both iOS and Android using web skills such as Javascript. I don't know yet if you can deploy for both platforms using the SAME code. It would be great!

There is also Titanium Desktop but I don't like the idea that the complete source code is shared with the final application. Titanium does this for Mobile too but it isn't that easy to modify an app loaded via App Store.

So, what other way is there to create an application which runs on at least the three major desktop platforms? I thought c# with mono would be the way to go but I just realized that you need to use mono with MonoMac in order to publish it on the Mac App Store and use things like Growl. And since MonoMac is naturally only available for Macs, it's again not possible to deploy the mono app on all platforms without rewriting it for at least the Mac. And it would be nice if the app looks "native" on all platforms. Gtk# just does not look good on a Mac. It's "okay" on Windows and great on Linux.

I know we could use Objective-C for iOS and Mac, Java for Android, C#.net for Windows and C#.mono for Linux but the main point is that we don't want to write the same app in a lot of different languages. That would make development and maintenance really hard.

And we prefer languages with C-style syntax which are much easier to learn for us PHP web developers. Btw: We dislike Air and I'm not sure about Java since I never used it but it also does not look "native" and it feels kinda slow.

Edit:

Just a note: It wouldn't be a problem to create an own form for each platform if at least the remaining code is the same. Is it possible to use MonoMac, Gtk# and Win Forums in the same C# application? And I'd prefer C# over C++ as I have no skills in C++, so I first need to check how hard it is to write with Qt.

Another note: We don't plan to spend much money and because we need to pay Apples Developer Programs we want to use free or cheap technology. Preferable Open Source.

Answer

Oded picture Oded · Mar 15, 2011

Just use C# for all of the above.

The mono project will cover Mac and Linux, with monodroid your android requirements are covered and monotouch will take care of iPod/iPad/iPhone.

In regards to UI - mono has full support for the System.Windows.Forms namespace, so you don't have to use GTK# if you don't want to.

I don't think I need to mention windows support ;)