views:

2495

answers:

10

For "best" I intend that the code shouldn't need, or need very few, platform specific tweaks.

A: 

I would think that it depends on what kind of platforms you plan on targeting. Java will have the most platforms with a VM. However, if you just want to use Windows and Linux, you can use C# (using mono on linux).

Howler
First confirm that you can get, and continue to get, Mono for any platform you customers might wish. Many major distros don't supply anything past Mono 1.2 or 1.9, with Ubuntu 9.10 and SUSE as exceptions.
NVRAM
+2  A: 

Java is certainly nice, but I've been doing just fine with Python and Qt via PyQt4 lately. I find that I get things done faster than I did in Swing or SWT, too.

So far, no platform-specific tweaks have been necessary, and Qt4 widgets look nice on different platforms. The Qt GUI builder is very nice, and using Python has enabled easy integration with some other cross-platform frameworks (notably VTK, scipy-cluster, and some SWIG-wrapped objects for interfacing with files output from a performance tool).

Note that Qt is not free unless you use it on open source projects.

tgamblin
A: 

Based on your definition, no. Even wit the newest graphical libraries you can expect to do a bunch of testing on different platforms.

Flash would probably be the best. Wide spread and better at looking the same across different platforms.

Will Dieterich
I’m not sure about today’s Flash’s performance but some years ago scrolling a list that was several thousand pixels high was anything but fun. :)
Bombe
Some years ago Java GUIs used to be pretty terrible too. Hardly a useful fact, several versions and a generation or two of hardware later.
John
+10  A: 

I strongly recommend Java for cross-platform GUI development. In particular, I recommend the GUI builder that comes with the Netbeans IDE. It's very simple and very powerful. You can point and click and drag and drop to create a GUI, and easily customize the actions which various buttons and other components take.

I much prefer Python as a language, but none of the free tools for GUI development come anywhere close to this, and the same thing seems to be true for the other languages I've used. (I should point out that QT has wonderful GUI developers for various languages such as C and Python, but it's only free when used on open source projects.)

EDIT: QT has recently been relicensed as LGPL, so you're free to use it in commercial applications. The Python bindings for this (PyQT) have not been re-licensed.

Eli Courtwright
I also recommend Netbeans. Its GUI Designer is so great I can compared it with Visual Studio.
m3rLinEz
How good is it compared with Intellij Idea? I've heard very good things about NB, but I haven't found a direct comparison with IDEA
OscarRyz
I've never tried out IntelliJ because of it's non-free nature, so I'm not sure, although I've also heard excellent things about it.
Eli Courtwright
+1  A: 

These days there are many languages that allow you to create cross-platform GUI applications efficiently. Java, Python, Tcl/tk, C#...

I think you need to define the requirements of your application a bit more, for instance:

  • Will the UI be Web-based, or desktop-based?
  • Is the application going to be a large or a small?
  • Will it feature some sort of "extension" feature (e.g. plug-ins)?
  • Will it function over a network, and is it likely to be distributed/load balanced?

The list can go on forever, work out the defining points about your application, and start researching the language based on the whole.

seanhodges
+2  A: 

Yes: use Eclipse RCP. You can write not only cross-platform, but e.g. multilingual applications with it. SWT provides the native look-and-feel for multiple platforms and windowing systems.

thSoft
+1  A: 

As long as someone defines "platform independence" correctly, Java is the best.

Some people argue that C# is the best, but those people seem to misunderstand the term "platform independence" ;)

Note: I refer to the fact that C# is ported to Linux/Unixes only as long as Microsoft and Novel keep up their treaty. The community itself would never be able to maintain such huge platform as .NET

ivan_ivanovich_ivanoff
+1  A: 

I would also consider Mono as serious contender for platform independence and a good IDE tool. Java's performance sucks on the desktop. Just check http://www.codeproject.com/KB/dotnet/RuntimePerformance.aspx

dmihailescu
A: 

Sorry some of you are a sleep.

USB/ serial and other forms of I/O , not to mention the devil incarnate Mr Ellison is now in charge.

I used to love java, but i spend so much time dealing with tools that require access to certain parts of the OS , that are just not handled correctly in java.

bob
A: 

I personally despise the whole concept of emulating the native GUI that is where the Java GUIs are rooted. Instead of being at home wherever you go, it makes you a tourist everywhere, often needing an interpreter. The Eclipse GWT is a better toolkit that makes much better use of local resources, but it still holds that people love to write Java code, and hate to use Java applications, think of it: which Java applications you love on your desktop?

Tk is just as ugly and limited on any operating system you choose to run it onto, and the same goes for Qt, in my opinion.

Mono would need a good try, as it is a way to answer the question "why Linux sucks", if you remember that old post bi Miguel de Icaza. Mono comes with a mature set of widgets and Apis and does not try to limit what you can do in order to give you portability.

Silverlight is close to portable and has a great interface definition language, but lacks access to the system, you have to split the application between a server and UI even on the same machine to overcome it.

Adobe AIR is a dog and local system acces is not easy.

If I am able to choose, I tend to avoid GUIs altogether and try to use a web server, even a local web server, and Json, JQuery and all that stuff. I found out that I can have many more choices and am more productive than with native widgets. This combines the strengths of the use of a real language server side and the wonderful disordered geniality of JavaScript in the GUI.

mico