views:

260

answers:

7

I was currently developing a desktop application in C# using mono and testing in SuSE and Windows. The concept doesn't matter much, but it is a "web lint" program that will scan a web site and return possible issues with security and/or cross browser compatibility. However, I want to be able to offer binaries for multiple platforms. Should I stay with Mono, or is there another platform that would give me a better availablility of platforms, such as on Macs, Windows, Linux, and others (possibly mobile platforms), and make it easier to port?

+1  A: 

Java will run on Windows, Linux and Macs. Should be easy to transition from C# - use Apache HTTPClient for grabbing the web content you are scanning, and the scanning code should be more or less the same. However the downside is requiring the user to have the Java runtime installed.

Python is another option - you can build stand-alone executables for Windows, and it comes with most Linux distributions by default, and also Mac OS X (citation needed ;) ). This is a lot less hassle for Windows users (language is compiled into the executable, no other downloads required).

If mono runs on Mac OS X then surely that is a good platform as well?

JeeBee
+2  A: 

Well, your best bet always is to use a language that actually exists on all the platforms. That usually means Java, I think, though even perl has flavours for mobile platforms (depending on the mobile platform in question).

I do most of my cross-platform work in C and perl, but there are some headaches with C (lots of #ifdef's), and perl may not be on a mobile platform you care about (yet). You'll have to evaluate the languages/compilers/interpreters that are common to all the platforms you want to target and then choose from that list. Without knowing the full list of such platforms, we'll have a hard time telling you what to use, though Java has enough buzz-wordness to likely be a strong candidate.

Tanktalus
A: 

It really depends what you want to do. For web development, if HTML/JavaScript is enough then stick with it. If you need more advanced stuff I would use ASP.NET with Mono (what you probably did) since you already know that. (You can use Visual Studio here.)

Another option might be (since you are a C# developer) to use Silverlight. That gives you Windows and Mac platforms covered and hopefully Moonlight will cover Linxu platform later. (You can use Visual Studio and Expression Blend here.)

If you need desktop application then Java is probably the easiest since you already know C#. But if you know C/C++ try to take a look at wxWidgets for example.

David Pokluda
+2  A: 

C# and Mono is probably cross-platform enough for most desktop environments. The trick will be the "mobile platform" requirement.

Mobile operating systems are wildly diverse and there's not a lot you can do to generalize. Some have Java, like the Blackberry. C# may get you onto Windows Mobile-based platforms. iPhones do their own thing. You pretty much have to pick a platform and target that. That may end up informing your desktop platform choice.

Darcy Casselman
+3  A: 

Iff you know C++, Qt will cover many platforms.

Nemanja Trifunovic
+2  A: 

Just stick to the Mono, make sure that you have Gendarme code inspector (FxCop for Mono) checking your code for portability issues, and you should be fine.

Rinat Abdullin
A: 

Why limit yourself to the traditional C#/Java? Have a look at Adobe AIR and Microsoft SilverLight

Conrad