Results 1 to 7 of 7
Hello, everyone.
I want to write simple graphical front-ends (I'd rather say, GUI wrappers) for some command-line programs.
What combination of programming/scripting language + GUI library could you recommend?
Necessary:
...
- 07-06-2008 #1Just Joined!
- Join Date
- Jul 2008
- Location
- Russia, Novosibirsk
- Posts
- 3
Writing GUI front-ends: what language + what GUI library?
Hello, everyone.
I want to write simple graphical front-ends (I'd rather say, GUI wrappers) for some command-line programs.
What combination of programming/scripting language + GUI library could you recommend?
Necessary:
1. Support for both Linux and Windows without modification of code.
2. Easy call of command-line programs without showing their output to the user but with a possibility of processing the output in the program.
Preferably:
1. Support for MacOS.
2. Simpleness and high speed of development.
3. Good documentation and large enough community.
4. Object-oriented GUI library.
5. High speed of GUI on PC with slow CPU and primitive video card.
- 07-06-2008 #2
Portability and speed are kind of mutually exclusive.
GTK+ can be used on all three OS and it has acceptable performance. But it is not the easiest to work with.
wxWidgets has broad support but it is hard to feature specific controls of the particular operating system it runs on.
If point 5 is of the least importance, you might want to look at Java.
- 07-07-2008 #3
Alrighty...
On Linux, the two primary widget toolkits are Gtk+ and Qt. There are of course others, but these are the main ones. Both are OO, so no worries there, and both have rather extensive documentation.
Gtk+ is native to C, which is not an OO language, so it kind of fakes an OO design. You can also use gtkmm, a C++ wrapper for Gtk+. There are also Perl modules to use Gtk+, and wrappers for many other languages.
Qt is native to C++, and I don't know as much about it, but I'm sure that it has wrappers in all sorts of other languages as well.
So this has not helped you at all. And that was rather intentional. Because I think that your question is flawed.
Let's see what your points are:
Are you actually intending a single program to run on both Windows and Linux? If you're writing a commandline wrapper, it's rather unlikely that you will have the same commands on both (unless you're running Cygwin or something), and the system calls that you make will be entirely different.1. Support for both Linux and Windows without modification of code.
This is entirely unrelated to your GUI toolkit. You will invoke the program by popen()ing or fork() + exec()ing, and it is entirely a non-GUI thing.2. Easy call of command-line programs without showing their output to the user but with a possibility of processing the output in the program.
Assuming that you mean OS X, I believe that Gtk+ is available for Mac.1. Support for MacOS.
Both Gtk+ and Qt have WYSIWYG GUI designers available, which is about as simple as you get. However, no cross-platform app will be "simple".2. Simpleness and high speed of development.
Any option you choose will be documented and thousands of people will have used it.3. Good documentation and large enough community.
I can't imagine that this will be a majorly limiting factor.5. High speed of GUI on PC with slow CPU and primitive video card.
GNU-Fan's suggestion of Java may be a good one, as Swing is cross-platform and it's a very popular language. As far of ease of development, it would definitely win for a cross-platform app. However, I'm not sure that the cross-platformness is super achievable in a useful manner, so it's up to you.DISTRO=Arch
Registered Linux User #388732
- 07-07-2008 #4Just Joined!
- Join Date
- Jul 2008
- Location
- Russia, Novosibirsk
- Posts
- 3
Thanks for your replies.
Yes, the target Windows machine has Cygwin and all necessary console apps are cross-platform.
Sure it is not GUI related thing, but probably language and its libraries one. I hope to find a language in which calls to command-line apps may be high-level enough for programs/scripts to be cross-platform.
I think I forgot to add one preference to my points: it is desirably that GUI will be created dynamically (somehow structurally/logically, not by hand).
- 07-07-2008 #5
Why don't you try PyGTK or PyQt? Both of them are cross-platform.
- 07-08-2008 #6Just Joined!
- Join Date
- Jul 2008
- Location
- Russia, Novosibirsk
- Posts
- 3
I think I'll try tk + Python or Tcl.
- 07-09-2008 #7Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
I would say that the only one I know that comply with MOST of these premises is probably QT 4.x (not 3.x). Of course 5 is very relative, but if you are considering Java as an option, I doubt that any other toolkit can perform worse.
There are binding for many languages... The natural option is c++ though.
QT 4 is portable enough, but if you do system calls, as someone else stated above, then you are bound to OS peculiarities. Most code will be portable, but OS specific code is unavoidable when making frontends, plust you are not going to be able to use the same commands in all OS'es.
About 4, it all depends on how picky are you about "what's an OOP language". Most purists believe that OOP does not exist at all. It depends on who you ask.


Reply With Quote
