Re: [SLE] Programming environment selection.
Derek Fountain <derekfountain@yahoo.co.uk> writes:
I'm wondering what programming enviroment to use for following:
GUI interface for user (linux/KDE/Gnome), very basic, nothing fancy. Also I need MySQL access from the SW.
You don't give too many details on what you're trying to do or whether it's for you own use or a commercial product, etc. Expect answers to be of a general nature.
For basic GUI building the best solution by far (IMHO) is Tcl/Tk. What can be achieved in 20 lines of Tcl is quite astonishing. You mention Qt, and PyQt is an option if you can accept the licencing terms. It's considerably lower level, and hence much harder and slower work than Tcl/Tk. From what you say it's also probably overkill for what you need. I gave up with it because I found it inefficient for my needs, and it crashes mysteriously every so often which is seriously annoying. If you choose Tcl/Tk you need some MySQL bindings. Start here: http://mini.net/tcl/mysql.
Alternatively you might prefer Perl/Tk. The Perl DBI database interface is second to none, but the interface to the Tk GUI toolkit sucks rocks. Perl/Tk is pretty much unusable to someone experienced with Tcl/Tk.
Perhaps a good compromise is Python and Tkinter. Python is a fine language and has a good MySQL binding module. Once again, though, the Tk Toolkit binding isn't great.
Which to choose? If the GUI is important and you envisage doing lots of maintenance to it, use Tcl/Tk with the MySQL binding. If the database interaction is the main part of the project go for Perl or Python and suffer the lousy GUI interface. If it were me, and the project allowed it, I'd write the application logic in Perl or Python as command line tools, then bolt a Tcl/Tk front end onto it. Don't dismiss this method - an awful lot of Linux tools are structured like that.
I agree that perl is by far the best choice for the database interface (using the DBI module you can switch between MySQL, PostgreSQL, Informix, DB2, Sybase, mSQL, or Oracle etc. just by changing a single line), and if any aspect of your application suddenly becomes too compute intensive for perl code, it is almost trivial to add a C or C++ module of your own (or find one that does what you want already on CPAN.) You should look into using glade and perl-gtk (and perl-gnome) for your gui (You will need to download glade2perl and perl-gnome yourself as SuSE does not include them.) Using glade you can design your gui using a very powerful WYSIWYG interface, and then generate code in either C, C++, Ada 95, Perl or Eiffel using the same design. Using libglade you can even change the design of your gui without having to recompile your C or C++ application (the gui part of perl-gtk is also separate from the rest of your perl application, so it is also easy to change your perl-gtk gui without messing with your database application code.) (I like perl/Tk myself (probably because I do not know Tcl/Tk:-), but you cannot beat a WYSIWYG interface like glade when it comes to designing a gui.)
You should look into using glade and perl-gtk (and perl-gnome) for your gui (You will need to download glade2perl and perl-gnome yourself as SuSE does not include them.) Using glade you can design your gui using a very powerful WYSIWYG interface, and then generate code in either C, C++, Ada 95, Perl or Eiffel using the same design. Using libglade you can even change the design of your gui without having to recompile your C or C++ application (the gui part of perl-gtk is also separate from the rest of your perl application, so it is also easy to change your perl-gtk gui without messing with your database application code.)
Yes, that's an option too. I didn't include it in my reply because Gtk/Glade is hopelessly inferior to Qt/Designer, and the OP specifically mentioned Qt. If the goal is to integrate into GNOME with genuinely free software then Gtk from a scripting language would definitely be a way to do it. I'd still recommend Python over Perl for GUI work though! --
eatapple core dump
participants (2)
-
Derek Fountain
-
Mark Gray