crenz has asked for the wisdom of the Perl Monks concerning the following question:

I need to do a smaller (6-7 windows/dialogs) GUI-based project that needs to run mainly on MS Windows. The program needs to deal with MIDI and MIDI files, and since I happen to like perl, naturally I am looking into using perl :) (even though the guy I'm going to do it for would prefer me to use SmallTalk). However, the different GUI libraries available confuse me.

I only have GUI experience with Delphi, C++ (Qt) and Java, so I'm wondering which library I should use with Perl. I am aware of Tk, wxWindows and Win32::GUI. What are your experiences with these libraries? Is there a good comparison somewhere on the Net? Are there any speed issues (both development speed and execution speed)? Also, is it all manual coding or are there any good (and free) visual tools?

Thanks for sharing your wisdom :).

Replies are listed 'Best First'.
Re: Which GUI Library should I use?
by Callum (Chaplain) on Nov 15, 2002 at 09:41 UTC
    My first thought is you say it "needs to run mainly on MS Windows", and without wanting to appear unconstructive -- how mainly is mainly? Also although it GUI based is there a command-line varient? Your choices will probably be very different depending on whether it's 95% MSWin or say 60%, and whether or not a CLI alternative is availble or if people *have* to use the GUI.

    My gut reaction would be to use Tk unless you're almost exclusively MSWin in which case I'd advocate Win32::GUI.

    There's a lot of tutorials, documentation and code examples around for Perl/Tk, probably more than any other. But then again, it's the only one I'm reasonably familiar with (all my coding is manual sso I can't reccommend any visual tools).

      Okay, sorry for not being specific enough -- the app needs to run on Windows only, but I would consider it a nuisance to have to rewrite it just to be able to use it under, say, MacOS X or Linux as well. So if using a non-portable library would make things a lot easier, I would consider it -- else I'd go for the portability. A CLI would not make sense for that app, it is strictly GUI only.

      Seems like people have made good experiences with Tk. I do confess I thought it to be rather "clunky", but now I feel encouraged to go and give it a shot. Thanks so far!

        Here's a Tk primer Essential Perl/TK Programming that helped me get a feel for what I needed to start with..

        -----
        Of all the things I've lost in my life, its my mind I miss the most.
Re: Which GUI Library should I use?
by AcidHawk (Vicar) on Nov 15, 2002 at 10:08 UTC

    I have use both Win32::GUI and Tk. I found that I picked up the widget positioning in Win32::GUI far quicker that with Tk. Although I have since spent some time creating a Tk interface and the plotting seems far more thourgh in Tk..

    I also believe that by using the Tk library you will be able to produce code that will be able to run on both MS windows as well as X-Windows. I have not heard of anyone even trying to use Win32::GUI on anything other than MS Windows.

    So in a nutshell I would use Tk .. it may take a little longer to grasp (esp. if you're like me that is incredibly slow to pick up anything new) but I think you will get far more milage out of your code in terms of portability if you use Tk.

    Update: Jeesh I battled with the english in that last sentence.

    -----
    Of all the things I've lost in my life, its my mind I miss the most.
Re: Which GUI Library should I use?
by busunsl (Vicar) on Nov 15, 2002 at 09:42 UTC
    There are also Qt and gtk.

    Since you know Qt already you might go for that.

Re: Which GUI Library should I use?
by Bukowski (Deacon) on Nov 15, 2002 at 10:13 UTC
    I'm in the process of learning Perl/Tk at the moment and whilst I've not used it for a real project, I can tell you why I was spurred on to learn it. Firstly, it is relatively simple to pick up (even for me!) but secondly and most importantly I have seen some very nice Perl/TK apps being used for sound editing at a company my friend used to work at.

    I don't know why I always imagined things would be rather 'clunky and slow' with Perl/Tk but in these apps it wasn't the case - very pretty, very useable and very fast.

    Of course YMMV :)

    Bukowski - aka Dan (dcs@black.hole-in-the.net)
    "Coffee for the mind, Pizza for the body, Sushi for the soul" -Userfriendly

Re: Which GUI Library should I use?
by valdez (Monsignor) on Nov 15, 2002 at 12:43 UTC

    There is also Wx.

    Ciao, Valerio

    Update: sorry, I didn't read carefully your question.

      Yes, I was already referring to WxWindows in my question. Do you have any experiences? It seems to take a bit more effort to get used to, but I like the widgets it offers. The only drawback is that it doesn't seem to be UTF-8 compatible yet.