Is Perl a good option for writing platform independent desktop applications?
Asked Answered
S

4

5

Is Perl a good option for writing (possibly and partially) platform independent desktop applications? I know there are interesting widget libraries like GTK2 Perl and wxWidgets but I'm not familiar with development on Windows.

Is it possible to write a good application with Perl and those tools, maybe embedding everything needed to avoid asking the user to install external (and probably non conventional for many) libraries? Are there examples of this kind of apps around?

Signally answered 20/1, 2010 at 14:48 Comment(5)
Desktop or web applications? Title says one thing and body says another.Psychotechnology
I'm sorry, title beats body: I meant desktopSignally
Are you asking because Perl is the only language you know? Why does the language have to be Perl? What else are you considering?Convergent
I'm asking because I like Perl and I would like to be able to write applications which can run on windows too, but I'm not interested in .net stuff since my main working environment is linux. I have no real need since it's for personal interest, so I can pick my playground.Signally
An easy way to make an application 'platform independent' is to make a Web application... The first thing you should think about is: 'Do I really need a Desktop application ?'Adcock
H
4

My employer uses ActiveState's PerlApp to produce executable versions of our apps with great success.

We tested PAR and PerlApp before selecting our packaging method. At that time, PerlApp had faster load times. Several versions of each tool have come and gone since then, so I would recommend testing with each before selecting a tool.

Executable packaging has been very effective for us.

There are a few portability issues issues with Perl, but if you pay attention to perlport, it's easy to avoid most issues. Our biggest problems are always with Win32. From time to time, some simple thing will require stupid, bizarre work-arounds or digging into Win32 API for a platform specific hack.

We have used both Wx and Tk guis.

Frozen Bubble is a well known and widely available app you can look at.

Hanus answered 20/1, 2010 at 16:13 Comment(0)
D
6

Sort of. You can certainly write Perl scripts that provide a Tk GUI that will work on any platform, and you can even package the libraries they need to work with PAR to put together an application that will run anywhere with an appropriate version of perl installed without requiring the end use to install a bunch of stuff from CPAN to get it to work.

However, an application that will run anywhere without requiring an existing perl installation (and it's probably not safe to assume the average Windows user will have perl) isn't really viable. One solution would be to distribute an "everywhere but Windows" version that simply uses PAR to include the necessary libraries, and a PAR::Packer-built version for Windows, which would be a fully-functional .exe including the perl interpreter and the libraries.

EDIT: following daotoad's response, it does appear that ActiveState's PerlApp can build cross-platform binaries for for Windows, Mac OS X, Linux, Solaris, and AIX; I haven't tried this but if it works as advertised it would seem to meet your requirements.

Demurrer answered 20/1, 2010 at 15:0 Comment(0)
H
4

My employer uses ActiveState's PerlApp to produce executable versions of our apps with great success.

We tested PAR and PerlApp before selecting our packaging method. At that time, PerlApp had faster load times. Several versions of each tool have come and gone since then, so I would recommend testing with each before selecting a tool.

Executable packaging has been very effective for us.

There are a few portability issues issues with Perl, but if you pay attention to perlport, it's easy to avoid most issues. Our biggest problems are always with Win32. From time to time, some simple thing will require stupid, bizarre work-arounds or digging into Win32 API for a platform specific hack.

We have used both Wx and Tk guis.

Frozen Bubble is a well known and widely available app you can look at.

Hanus answered 20/1, 2010 at 16:13 Comment(0)
D
3

Check out PAR (available via CPAN) with respect to your bundling requirement.

Consider having a look at Padre for an example of a complex application written in perl using Wx.

So yes. All of your requirements are achievable, including portability.

Degas answered 20/1, 2010 at 15:0 Comment(2)
I haven't found Padre to be portable, mostly because Wx is such a pain on some platforms. Sure, you can make it work eventually, but I don't count that as real world portability. Possible is a bit different than reasonable.Convergent
Yes, I'm on a Mac, but I have also had trouble getting Wx to work on Windows and linux. The stars have to align properly for everything to work out. However, that's always when I'm trying to compile stuff myself. The problem with Mac testers is probably that none of them need Padre. I'm completely happy with my editor, as are most of the Mac people I know.Convergent
U
0

I am working on the module XUL::Gui on CPAN, which uses Firefox to display cross platform gui apps from Perl. It is under development, but stable, and may be complete enough for your needs. You can build your gui in HTML and/or XUL (the Mozilla gui language that Firefox itself is written in), and then style everything with CSS. Let me know if you have any feature requests.

Untwist answered 20/1, 2010 at 21:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.