Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Perl with a GUI

by chance (Beadle)
on Jun 04, 2004 at 17:57 UTC ( #361014=perlquestion: print w/ replies, xml ) Need Help??
chance has asked for the wisdom of the Perl Monks concerning the following question:

So I haven't done any GUI programming since about 1994, with Motif. My wife wants to make a calendar program, and I decided that I'd like to make a simple strategy/board game.

So I surfed around last night, and decided that WxPerl (a wrapper for wxWidgets) is the way to go. Almost with with perl-gtk, but the build/install didn't work out of the box, and the more I looked at it, the more dead/clunky it looked. Plus it looks like getting OSX/Gtk app to run out of same code will be more easily doable with WxPerl. Not 100% against Tk, but it seems so perl-specific, less general purpose, less cross-platform.

Anybody here use WxPerl? Like it? Hate it? is it alive and kicking?

Curious as to what people here use (if you do any GUI's)

Comment on Perl with a GUI
Re: Perl with a GUI
by Plankton (Priest) on Jun 04, 2004 at 18:37 UTC
    Tk was originally used with Tcl, so I wouldn't Tk is Perl specific. Also I wouldn't say Tk is less cross-platform. Why would you say Tk is less cross-platform? Tk is great if you want to do a strategy/board game. I just posted a simple one ... Tam's Chinese Peg Game

    Plankton: 1% Evil, 99% Hot Gas.
Re: Perl with a GUI
by Django (Pilgrim) on Jun 04, 2004 at 18:45 UTC

    I've recently done my first GUI and took the same modules to closer consideration. I agree about gtk, and WxPerl frightened me a little bit - it really seems way more general purpose than Tk. So I've used Tk and it was really fun. It's well documented and easy to learn, but a bit weird in some details and surely not as full-blown as Wx.

    -- Django
    "Why don't we ever challenge the spherical earth theory?"

Re: Perl with a GUI
by blahblah (Friar) on Jun 04, 2004 at 19:02 UTC
    If'n I was doing any GUI perl I would look at PerlQt. I havn't tried it, but Qt seems to be the new black (especially with all those python kids).
Re: Perl with a GUI
by jdtoronto (Prior) on Jun 04, 2004 at 19:35 UTC
    I have done quite a bit with Perl/Tk, it is alive, well, very stable and for cross platform - no trouble, my users are on Solaris, Linux, HP-UX, AIX, OSX, BSD and Windoze. Tk is anything but Perl specific - Perl/Tk is a port of the Tk libraries originally used with Tcl. The only problem with Perl/Tk is that their are a lot of really nice (contributed not core) modules which will run on **ix but not on Windoze. About 40% (and declining fortunately) of my users are on ...doze so I am a little limited in some respects.

    wxPerl looks nice, I played with it for a few hours - the entire wx scene seems to be quite active.

    I have had a good look at Qt docs, and I may go there in the future, I will need to extensively test it cross platform before I can make a move though.

    jdtoronto

Re: Perl with a GUI
by dimar (Curate) on Jun 04, 2004 at 20:30 UTC

    This may sound a little 'out in left field' but some folks actually uses a web browser for a lot of GUI tasks, especially with scripting-centric languages such as perl.

    For Windows, you will find people using Internet Explorer with the "HTA" functionality. For cutting edge folks, you will see some XUL with Mozilla Fire(bird|fox|insert_animal_here).

    The hassles are: not very many people use this approach; perl does not have great support for XPCOM (which is analogous to COM objects, but for Mozilla); performance problems; interop problems; security restrictions;

    The benefits are: if you know how to do HTML+DHTML+Scripting, you already know how to build a GUI; easily plug in stuff like FLASH, SVG, audio; custom tags; etc etc, anything that fits into a web page you can put in your GUI; development tools are plentiful; pretty-looking output is easy for those with good design sense. Mozilla is constantly improving and has great UI controls ... see XUL.

Re: Perl with a GUI
by traveler (Parson) on Jun 04, 2004 at 21:26 UTC
    Yes, perl-gtk is old. It has been replaced by Gtk2-perl. I really prefer it over Perl/Tk, after building apps with each. Gtk2-perl is under active development, but is very stable and has enhancements over plain Gtk+. Check out http://gtk2-perl.sourceforge.net/ for the latest on gtk2-perl including examples, etc..
Re: Perl with a GUI
by kragen (Sexton) on Jun 04, 2004 at 22:56 UTC
    PerlTk is really nice for quick stuff. Qt is more capable than Tk, though. But my current Perl projects use a browser for the "GUI".
Re: Perl with a GUI
by BUU (Prior) on Jun 04, 2004 at 23:22 UTC
    wxPerl is the Bee's Knees.

    I really like it, it has lots of useful widgets, it's easy to use, theres lots of documentation, etc.
Re: Perl with a GUI
by gmpassos (Priest) on Jun 05, 2004 at 02:15 UTC
      Nowadays Perl/Tk looks different on Win32 and Unix. You'd be hard-pressed to tell it appart from native widgets. For my part, I had to choose between Wx, Tk and Win32-GUI lately for a windows app (my first GUI app ever!), and I chose Tk because the relevant *Perl* documentation is more extensive (there's even several books on the subject) and it's the most used so lots of support is available. Win32-GUI is the worst with regards to documentation (almost non-existent) and I quickly discarded it. Wx is somewhere in between (mostly it tells you to read the C bindings!) Wx seems to have more widgets but it also seems a bit more complex and to require more actual code to accomplish something. Then again, there's tons of Tk widget modules on CPAN, so perhaps Wx doesn't really have an advantage in this area. In any case, I was able to find a suitable Tk widget for all my needs. I did run into a few problems with bugs in some Tk widgets, but they were easy to deal with (a quick google search turned up code to fix the problem). I don't know how Wx fares in this regard.
Re: Perl with a GUI
by hossman (Prior) on Jun 05, 2004 at 05:03 UTC

    This item caught my eye a few weeks ago.

    I don't do much GUI programming anymore, but from what I hear, VTCL is a pretty good GUI builder, and as that node shows, backing that that Tcl/Tk built GUI with perl guts is fairly straight forward.

Re: Perl with a GUI
by CountZero (Chancellor) on Jun 05, 2004 at 19:24 UTC
    If you use the ActiveState Perl on Windows, Tk comes pre-installed and although wxPerl is probably more "state of the art" I could not get it to run on my machine :(

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

      You should try again. gmpasso's link above to http://wxperl.sourceforge.net/ has a Download section with binaries that worked perfectly. I have been developing Tk stuff for about 2 years but decided to have a look because of the comments in this node. It is really an impressive piece of work. I am going to invest the time to learn it because the demo's showed examples working well with threads and multiple processes. It appears much faster, and it has a better looking interface and a richer widget set than Tk. I built out the first example and it is completely different from how you build a Tk gui. (Not worse, you just have to think more OOP.) WxPerl really needs an O'Reily book on it. I used ActiveState 5.8.0 and the wxPerl unicode version from http://wxperl.sourceforge.net. I also ran the script through perlapp and it produced a smaller executable than Tk and ran just fine. I am hooked.
        I will certainly try it. I was really impressed with wxPerl when it was presented last year on YAPC::EU in Paris, but as it failed to install, I dropped it.

        CountZero

        "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2014-04-17 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls