Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perl GUI programming on Windows

I'm looking for tools for Perl GUI programming on Windows for educational/in-house development, mostly science related.

My first choice was PerlQt. A friend of mine was developing with Qt and C++ so I expected getting some help from him. Also Qt has a GUI creator and Linux has nice integration with Perl. Unfortunately, I failed to make it work on Windows. I searched for other options and am still not clear after search. This is what I've got so far.

  • Perl/Tk: broad user base, good documentation, relatively low learning curve. But old look and may not be active. Yet some articles say it is rebooted now and has native look.
  • wxPerl: native look. But steep learning curve. Not all wx library is ported to Perl. Some like it and some hate it.
  • Win32:GUI: native look, can use all Windows API. Needed force install because one of the tests was failed. Still works but not sure it was installed correctly.
  • XUL::GUI: using FireFox engine, CSS typing.

I could managed to install them and succeeded to show "Hello, world". Yet, I can't decide which one to go and the online information sometimes looks contradict each other.

Would you compare the tools in terms of human efficiency (easy to read and write codes), computational efficiency and the availability of GUI builder?

like image 854
microbe Avatar asked Sep 19 '12 13:09

microbe


4 Answers

Self promo for my perl module IUP :

  • it uses native widgets (= your app will have native look&feel)
  • it is also slightly cross-platform (Win32, GTK, Motif)
like image 80
kmx Avatar answered Nov 14 '22 21:11

kmx


For real cross platform GUI programming I would suggest Prima or Tk. Neither look great, but they work.

Still, I think you might be better served (hehe) by using a web front-end than a true GUI these days; this is easy using a web-framework. I would suggest Mojolicious though other people do like Dancer. My primary reason for suggesting Mojo over Dancer is that Mojo comes with lots of functionality in one tiny package. Then again, this is the reason that others would recommend Dancer, so that's a toss.

A final consideration is that Mojo comes with WebSockets out of the box. This makes it rather easy for your webapp to feel more like a true application, talking back to the server and getting responses without reloading.

Edit: I now have a good example of a desktop application written with a Perl/Mojo backend and a web-frontent: Azawawi's Farabi. It is a text-editor, geared towards writing Perl. It's GUI is the browser, making it a simple cross-platform editor. I recommend it as a starting point for similar tasks.

like image 39
Joel Berger Avatar answered Nov 14 '22 22:11

Joel Berger


I have an experience with PerlTk and wxPerl. wxPerl is rather decent toolkit which I can recommend. There is also a GUI builder available wxGlade

The few applications I had in Tk taught me to hate that toolkit wholeheartedly:

  1. it looks awful
  2. disproportional amount of coding time was spent on solving various bugs and finding workarounds for missing features
like image 2
jira Avatar answered Nov 14 '22 21:11

jira


Here is a good overview of widget toolkits- many of which provide wrappers to popular programming languages:

http://en.wikipedia.org/wiki/List_of_widget_toolkits

I recommend [wxwidgets][1] aka wxwindows, or a browser based solution (e.g. XULrunner) or a pure Javascript+HTML5 based solution. At the moment I am working on a cross-platform tool with only a basic console UI, which then uses websockets and HTML5 + SVG for a more complex UI rendition and UX. To make the web-content dynamic I use a simple template-engine.

( Personally, for overview questions, I had good experience to put the term wikipedia and list of somewhere in the search query of ones trusted search engine. Kudos to the diligent wikipedia community.)

like image 2
Lorenz Lo Sauer Avatar answered Nov 14 '22 21:11

Lorenz Lo Sauer