Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

GUI Development in Perl

by Akoya (Scribe)
on Jul 18, 2007 at 15:46 UTC ( #627282=perlquestion: print w/ replies, xml ) Need Help??
Akoya has asked for the wisdom of the Perl Monks concerning the following question:

I am interested in beginning to learn GUI development in Perl. I use Perl 5.8.8 primarily on OpenSUSE 10.2 with the KDE. I am somewhat interested in portability, but it is not a significant concern. Flexibility, reliability and maintainability are the primary goals. I know this is a loaded question, but ... "Which is better Qt or Tk, and why?" Are there other alternatives that should be considered? --Akoya

Comment on GUI Development in Perl
Re: GUI Development in Perl
by rvosa (Curate) on Jul 18, 2007 at 16:09 UTC
    I would suggest you look into Wx, and web-based gui toolkits such as XUL::Node.
      I'll definitely look into them. At a cursory glance, XUL::Node looks intriguing, but I don't really like that it appears to only work in Firefox. Wx may be a good option. Any more ideas on that, anyone? Thanks, Akoya
Re: GUI Development in Perl
by vcTheGuru (Chaplain) on Jul 18, 2007 at 16:29 UTC
      Thanks! I'll look into it. --Akoya
        hai
Re: GUI Development in Perl
by archfool (Monk) on Jul 18, 2007 at 18:04 UTC
    If you need portability, PerlQt doesn't work (well) on MS Windows, due to the smoke wrapper for the Qt libraries. It also appears that it hasn't been updated since 2003. :(

    http://perlqt.sourceforge.net/

    As much as I think Qt is a wonderful widget set, its integration with Perl is virtually non-existant. :(

      Thanks for the feedback. Windoze is not really an issue, but lack of support/updates may be. Lack of good Perl integration is a show stopper. Thanks, again. --Akoya
Re: GUI Development in Perl
by zentara (Archbishop) on Jul 18, 2007 at 18:12 UTC
    I use Perl 5.8.8 primarily on OpenSUSE 10.2 with the KDE. I am somewhat interested in portability

    Well here are some things to consider:

    1. Qt is what is used by KDE, but the Perl interface to it is practically useless, due to lack of interest or whatever. The last release was in 2003. So if you want to program in Perl, forget Qt. Qt using C is very good, especially for KDE.

    2. Gtk2 is very good, and the development is very active, just look at it's maillist for c-gtk2 and perl-gtk2. It has good tutorials, and alot of modern widgets. It can be a bit rough to learn as a first language though. It's neat feature is that if you can do it in Perl, you can convert it to C, since the libs are the same. Portability can be an issue with Gtk2. It is still a bit daunting to get the Gtk2 system installed properly on Windows. (Don't know about Mac's). Gtk2 apps have themes, and will take the same theme as defined in ~.gtk2rc . They will look like Mozilla or Firefox on a Linux system.

    3. Tk is very well supported and the best cross-platform compatibility out there. It comes installed with ActiveStatePerl, so Window users get it automatically. Tk has many supporters and snippets out there, as well as books written. "Mastering Perl/Tk" is the bible. You can find help to do almost anything with Tk, since there are so many existing users... this is not so true with Gtk2, where even the experts get stymied sometimes as to why something won't work. The biggest complaint you hear about is Tk apps look drab, but you can make the Canvas or Zinc widgets look great.....depending on effort put in. As a matter of fact, The Tk::Canvas and Zinc widgets are the number1 reason to recommend Tk over the others....they are still king of the hill. The downside to Tk is the lack of an active group of developers for the module itself. The module originator, Nick Ing Simmons, died recently, and there has been no one leader (except for Slaven Reszic) to take the reign. This is worrisome.

    So if I was starting new, and willing to put some time in learning, I would go with Gtk2..... there is a whole team of developers very actively working, and that portends well for the future.


    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
      Thanks for the very good feedback. I will definetly look into Gtk2 as an option. --Akoya
        Unfortunately Pq (Qt wrapped in PerlTk like api), was last updated December, 2005. :( It didn't support all the widgets that PerlTk supported, either. :(
Re: GUI Development in Perl
by llancet (Friar) on Nov 17, 2009 at 01:50 UTC
    Actually, Gtk also have interactive canvas widget: Gnome2::Canvas. And although compile Gtk2 in windows always become a nightmare even if somebody has mingw and dmake, people can use CamelBox perl which has pre-compiled Gtk2, pre-compiled PAR::Packer...
Re: GUI Development in Perl
by Anonymous Monk on Apr 06, 2010 at 06:51 UTC
    GTK,Glade is the better option.But actually there may be problems when integrating GTK2,Glade with ActiveState Perl..So i used Camelbox perl..I successfully integrated all these and craetd my project..Its simple...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://627282]
Approved by FunkyMonk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-09-01 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls