Gtk2-Perl

acme on 2004-03-23T17:53:01

So everyone has been worrying about high level languages on the desktop.

Well I decided to have a play with the Gtk2 Perl bindings last week or so. It took me a while to get the hang of how things went on, but overall I really like how easy it is to put things together.

I decided to write a sample app using GLADE. I created a window, added a text field, a button, and a list view, and saved it as XML. Then I wrote a program which uses Parse::CPAN::Authors, reads in the GLADE file using Gtk2::GladeXML, and puts in the right hooks. See the source. See a screenshot. Hey presto, a small GUI interface to search the CPAN author list. I really liked how easy it was to put together. GUI in Perl isn't dead. Maybe its time has come...


gtk and perl is quite nice

TeeJay on 2004-03-24T09:24:11

I did some GTK programming by hand in both C and Perl a year or two ago and I found it very productive.

I might try GTK2 again, the only concern I have with perl/gtk is the long list of dependancies involved - if I could build an easy to deploy bundle using GTK2 and Perl I would choose that over QT/C++ which I am currently looking at for writing GUI applications.

..of course I will probably try and do both as I want to learn C++ properly (i.e. write real code to do real jobs, its the only way to learn) and perl is so rapid it is ideal for prototyping a desktop or GUI application (yes, it is also fast enough to be the real thing too)

How about Wx?

simonflk on 2004-03-24T21:11:47

Very nice. Why didn't you use Gtk::SimpleList? I'm not familiar with Gtk but the interface looks simpler

acme said...
I really liked how easy it was to put together. GUI in Perl isn't dead. Maybe its time has come...

It's very much alive with Wx. I've knocked up a quick port of your app to wxPerl. Screenshots on Windows and Linux are available as well as the source

Re:How about Wx?

acme on 2004-03-24T21:37:57

That looks pretty good. I'd given up on Wx as I've found it hard to install and there wasn't Glade for it. Looks like wxGlade helps a lot in this respect ;-)