View Single Post
  #6   (View Single Post)  
Old 21st October 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

This is a thread I will reply to, because it is one I have given much thought to previously -> not just the GUI toolkit, but the entire personal framework of libs, tools, and langs for getting stuff done.


The major toolkits are:

Code:
GTK
        Supports: C, C++, Java, PHP, Perl, Python, 
        Ruby, C#, and probably Guile (scheme)

        Working with gtkmm (C++ bindings) on
        Win32 can be a bit of a pain in the butt to
        setup the development environment, to
        actually be able to compile and link 
        (pkg-config != fun on win). You'll also need
        the gnu compiler.

         I've found GTK works best for Python if 
         your goal is ease of portability. One
         advantage of GTK is it a few of the libraries
         commonly supporting it are also portable;
         with about as much pain as noted above ^

         Don't bother with Java/Ruby bindings for  
         GTK if you want to run on Windows, without
         getting 'jiggy with it'

         I've yet to use the PHP bindings, but they
         should be quite useful under Linux/BSD/Win

Qt

        Supports: C++, Java, PHP, Perl, Python, 
        Ruby, C#.

        Qt is natively C++, so you will need to 
        understand C++ to read the documentation.
        It is a fine toolkit and portable (Unix, Mac, 
        Win). The thing I like the most about Qt,
        it makes programming GUIs as painless as
        possible, while still being powerful.

        The only portable bindings you can count on
        (with ease) are C++ and Python for Qt4. 
        Ruby and Perl bindings are currently broken
        on FreeBSD and do not support Win32. The
        PHP/C# bindings are likely far from mature
        but I've yet to try them out.

        The Java bindings have binaries for Linux/
         Mac/Win32, but it's not in FreeBSD ports.

         The open source edition supports GCC on all
         the big targets; the professional edition will
         allow support for other compilers (MSVC++,
         Intel, probably HP-UX's, whatever)

WxWidgets

         Supports: C++, Java, Python, Perl, Ruby, 
         C#, Euphoria, Haskell, JavaScript, Lua, 
         Squeak, and their own form of BASIC.

         Unlike GTK/Qt which only offer the ability
         to emulate native widgets through themes;
         WxWidgets uses native widgets and an 
         abstraction library to call the native code.
         WxWidgets is a great toolkit, but one that
         I dislike the API of... but it's a great tool.

         Works well for C++ and Python; I've not
         tried the Java or C# bindings but they 
         should work well. The bindings are fairly
         portable, but I would suggest using either
         C++, Python, or Ruby if you're working on
         FreeBSD most often.

         WxWidgets supports many C++ compilers, 
         including GCC, MSVC++, and OpenWatcom.

Tk/Tkinter

         Never used them, should be as portable as
         TCL. Should work well for Python, Perl, 
         Ruby, and TCL at least.

Without going into Java's AWT/Swing/SWT and trying to use them via Jython and such stuff... lol.


For the most portable, I'd suggest GTK (Python/C), Qt (C++/Python), or WxWidgets (C++/Python). Qt and WxWidgets also have a good set of supporting classes to help out with a few odds and ends (e.g. regex), and GTK probably has the most widgets out of box.

For working on software that is supposed to run on FreeBSD, Windows, Linux, and hopefully Mac OS X as painlessly as possible for the FreeBSD/Win using coder. I've found Python to be the single best language, unless you want to use Java. Ruby may as well be forgotten for cross platform work with GUIs IMHO.

C++ will work quite well, if you are willing to deal with the portability and build issues. If not, go with Python. One reason I suggest Python + GTK / Qt / WxWidgets -> you have free choice of toolkit and many other libraries that are either standard issue or easy to install on FreeBSD / Win / Linux. Under C++ where there is a much smaller set of standard features, you need to factor your libraries portability as well, much much more so then in Python. An example, do you use regex from the same library most POSIX-basd apps use, Boost, Qt, WxWidgets, write your own, etc.


Having rubber banned between ~6 languages and 2 operating systems a lot, switching to Python and a 'choice' set of libraries as made my life much more productive, then cursing at Windows for being an annoying development platform, outside of the Wintellectuals.


If you're not familiar with any GUI tookkits, learning the basics of C++ and then starting with the Qt documentation is a good way b/c it is very well documented -> the Qt docs also reference many good books.


Just my $0.25 opinion.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote