Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

GUI and standalone Perl - can we build a new FAQ please?

by Cody Pendant (Prior)
on Sep 05, 2005 at 06:09 UTC ( [id://489148]=perlquestion: print w/replies, xml ) Need Help??

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

There have been various questions here, and on mailings lists I see, about creating GUIs for Perl scripts and also about creating standalone applications from Perl scripts.

There's an FAQ here but it's old and only about Windows as far as I can see. I've been trying to figure out the options myself and there are quite a few, although some of them are better documented than others.

I was thinking we should try and put together a new FAQ, or even just a table of the options, which platforms they run on, their licences, their requirements, their level of complexity, whether there's a graphic interface builder, the estimated size of the files they produce and of course, monks' comments.

Perhaps I mean two tables? Because providing a GUI for a script which runs on someone's Perl system isn't the same thing as creating a standalone executable, and presumably, if one wants a standalone executable, one creates a script with a GUI, then packages it.

So on the GUI side, there's Wx, there's Tk, there's Win::GUI, but there are a couple of things for OS X, for instance Platypus and Pashua which non-Mac people probably don't know about.

On the standalone side, there's perl2exe, there's App::Packer, there's PAR, or rather pp which comes with it (because there's a sub-category there, the packager that removes dependency worries but still requires Perl), there's ActiveState's PerlApp, there's CamelBones -- have I missed anything? DropScript for OSX might count?

This whole field is a bit of a mystery to me, and a good FAQ would be very useful. I've got a relatively simple script, which I would like to package for both OS X and Windows, and all it needs is a URL field, a "Go" button and a progress bar, but creating such a thing has proven remarkably difficult.



($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print

2005-09-05 Retitled by holli, as per Monastery guidelines
Original title: 'GIU and standalone Perl - can we build a new FAQ please?'

Replies are listed 'Best First'.
Re: GUI and standalone Perl - can we build a new FAQ please?
by fireartist (Chaplain) on Sep 05, 2005 at 08:52 UTC

    Why don't you make a start on a new Tutorial, and let others contribute to the areas you don't already know.

    In the last couple of weeks, I've been stunned to find it's possible to not only create a cross-platform GUI program, but to also easily turn it into a Windows .exe

    I used Wx for the GUI, and while I haven't needed a progress-bar, I can see that Wx apparently has them - in perl.

    To make the Windows .exe, I created a script that calls App::Packer::PAR->new(), just like pp does. And to create the Mac application, I used PrepAPPL (which requires perl and all modules already installed). To make a self-contained application, I believe camelbones should do that, but I haven't looked at it properly.

Re: GUI and standalone Perl - can we build a new FAQ please?
by emazep (Priest) on Sep 05, 2005 at 14:47 UTC
    Another viable solution (not mentioned in the FAQ) for a cross-platform GUI is to provide an HTML-based interface, essentially by turning your app into a CGI app, and then by embedding into your app a mini HTTP server (such as HTTP::Server::Simple, but there are also others on CPAN).

    POPFile is a successful cross platform stand-alone application (entirely written in Perl) which does exactly this.

    The new Devel::ebug is another (much acclaimed) application that does the same (through Catalyst).

    Furthermore Ajax-based technologies offer nowadays the same level of interactivity offered by a native GUI, so using such an interface you don't have to give up anything.

    Ciao,
    Emanuele.

      Actually, this is a very nice solution and I'd love to have some more information (FAQ, Tutorials, etc.) about it.
        Catalyst is probably at the moment the best framework to develop such an application, since it already offers both an embedded web-server and a plugin (Catalyst::Plugin::Prototype) to facilitate the development of Ajax interfaces.

        So I would suggest to approach it (though I have no experience about packaging a Catalyst-based application into a stand alone executable.)

        Ciao,
        Emanuele.

Re: GUI and standalone Perl - can we build a new FAQ please?
by Courage (Parson) on Sep 05, 2005 at 10:28 UTC
    don't forget to mention Prima, Gtk2 at GUI part.
Re: GUI and standalone Perl - can we build a new FAQ please?
by fmerges (Chaplain) on Sep 05, 2005 at 22:10 UTC

    Hi,

    Some people are talking about Webapps but that is not really the same thing like a GUI App.

    On cross-platform you don't have to rely on Wx, you can also use Qt or Gtk+ if you don't want to use Tk or others.

    Gtk or Qt are easy to learn, and have good Perl libs. You can do fast GUI prototyping using a application like glade or qt-designer, for the later.

    If you have a apps where you want/will have a remote db that will do the serialization of data, you can also use some of these, but you can also think about using some Webapps framework that has good AJAX bindings (like Catalyst), because using AJAX you can get the feel that it is really a interactive apps without the need of reloading and sending forms in a button like way... you know. ;-)

    Another approach would be to use XUL, is also cross-platform and you have access to all that Gecko can provide you...

    I was thinking about that there should be a good Tutorial or a Book about writing GUIs with Perl, and TOC could be:

    Perl GUI Programming
    • Introduction
    • Why GUI programming?
    • Local GUI Apps, Remote GUI Apps. Webapps
    • Perl and the GUI.
    • Developing GUIs with Perl
      • Tk
      • Gtk / Gtk+
      • Qt
      • WxWindows
      • ...
    • ...
    • References
      • GUI Design Patterns
      • Cross platform developing tricks
      • ...

    If someone will/would do this and need people, I would be available to contribute...

    Regards,

    |fire| at irc.freenode.net
Re: GUI and standalone Perl - can we build a new FAQ please?
by xdg (Monsignor) on Sep 06, 2005 at 11:33 UTC

    Given the number of people with opinions and ideas, and the many, many ways to do it, maybe setting up (and seeding) a wiki is a better idea than a writing FAQ or Tutorial and might stand a better chance of staying up to date over time.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-29 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found