Click here to Skip to main content
15,891,136 members

Response to: Programming GUI over linux

Revision 6
If you have some experience with C#, I would recommend the following: develop your application on Windows for Microsoft.NET. Use System.Windows.Forms (not WPF, not Metro). If your application does not use any Windows-specific code (like direct manipulation with Windows messages), no P/Invoke, and is in general confined to the standards (Form is itself a non-standard library, but you can use it, you can also use ADO.NET and something else, but most of the code should be based on standard CLI BCL, http://en.wikipedia.org/wiki/Base_Class_Library[^]), you can run such application on Linux without re-compilation!

How? Well, with Mono:
http://en.wikipedia.org/wiki/Mono_%28software%29[^],
http://www.mono-project.com/Main_Page[^].

I usually do it in three steps: 1) develop or update code using Visual Studio on Windows; 2) test it under Mono on Window; 3) test it on Linux or other platform under Mono.

[EDIT #1]

If you need to develop it in Linux, the available IDE is MonoDevelop:
http://en.wikipedia.org/wiki/MonoDevelop[^],
http://monodevelop.com/[^].

It is available on Linux, and also on Windows and other platforms. On Windows, you can also use #develop:
http://en.wikipedia.org/wiki/SharpDevelop[^],
http://www.icsharpcode.net/[^].

What's good about this one? You can use it to develop UI with a different library, GTK#, which is also multi-platform and has better compatibility of different platforms. Naturally, it is based on GTK, also available for all these platforms:
http://en.wikipedia.org/wiki/GTKSharp[^],
http://www.mono-project.com/GtkSharp[^],
http://en.wikipedia.org/wiki/GTK%2B[^],
http://www.gtk.org/[^].

[END EDIT #1]

Mono is available for a number of platforms: Windows, Linux, Mac OS X, iOS, Android and more.

[EDIT #2]

By the way, see Solution 2 about Qt. Not only this is another multi-platform UI library, mostly for C++, but it is also comes CLI-wrapped (or a port, I'm not sure), so you also can use it with Mono on both Windows and Linux (and other platforms).

Please see the available bindings here:
http://en.wikipedia.org/wiki/Qt_%28framework%29[^].

Look at the Mono UI toolkits in general:
http://www.mono-project.com/Gui_Toolkits[^].

You will be fine on Linux, don't worry… :-)

[END EDIT #2]

—SA
Posted 21-Sep-12 8:34am by Sergey Alexandrovich Kryukov.
Tags: , , ,