Building a professional application in Perl?
Asked Answered
B

4

6

I've built a set of tools I use in my day-to-day work and I would like to make them look a bit more "professional" in order to sell them to financial institutions.

At the moment these tools are written in Perl and are executed from a DOS command line, it's extremely efficient but it doesn't look very attractive.
So, I would like to add a user interface to it but I don't really know what to use for language knowning that :

  • A Perl CGI interface hosted on the web is not an option since the information to be given as input is quite sensitive.
  • It would be ideal to sell it as a package/executable.
  • I don't really like the Perl/Tk interface.
  • I'm ok with rewritting the application in another language but I would prefere to reuse the main modules in Perl since it's very powerful with regular expressions and lists/arrays.

What would you advise me to do ? Thanks, Lory

Braithwaite answered 7/6, 2012 at 7:26 Comment(7)
"web is not an option since the information is quite sensitive". There are Intranets, or even localhost.Brunette
Indeed I thought about it. It is maybe a stupid but is it a common usage to sell an application that requires to setup an Apache server, Perl, etc. ?Braithwaite
Yes. You may want to bundle it nicely, though. For example as a Virtual Appliance (for VMWare or VirtualBox).Brunette
"web is not an option since the information is quite sensitive" - there's https, VPN tunnels and encryption even inside https. Your rejection of a web UI is not really very logical.Platon
Thanks @Thilo, I'll consider it, I don't know a lot about virtualization yet but I'll investigate this way.Braithwaite
@Platon it's not only a matter of connection here. If the client has to upload a file or other data into an application located outside his area of control, he can never be sure of what this application is doing with the information. Let's imagine my script takes a copy of the inputed file for example...once again the information provided in this case can be extremely touchy and in my mind should stay local to give confidence to the client. Financial institutions are often very suspicious about those kind of things and I really have to pay attention to this point if I want to sell it.Braithwaite
@loeyck: And there's no need for Apache to distribute a web interface that runs on localhost. If you develop against any modern framework, it'll be trivial to bundle and run it against a PSGI server; no real installation/configuration needed.Woolsack
C
8

If you want a non-web-based GUI, and don't like Tk, there's also Wx, which is a wrapper for the wxWidgets GUI toolkit.

However, web applications nowadays can be really easy to create (using a modern framework). Take a Mojolicious application, for example: Mojolicious carries no dependencies other than Perl 5.12.x, and provides its own web server (Hypnotoad). You can start by generating a "Lite::App", which is a simple self-contained single-file application, and then grow it to a bigger distribution later on as the need arises. It even comes with tools to convert your application to a conveniently packaged distribution that can be installed as easily as any CPAN module.

So that leaves the issue of security. User authentication, IP whitelisting, local network only... there are many ways to make a web application "for internal use only" if that's what you need.

You might just throw together a web-application prototype, and once you determine customer interest in your product, invest the substantial time in writing it as a Windows GUI application.

Cathepsin answered 7/6, 2012 at 7:50 Comment(1)
It is much easier to cobble together a Windows GUI using a RAD toolkit then getting bogged down in the web assembly with HTTP, HTML, CSS, Javascript, statelessness, patches like Cookies. Especially if you're a newbie. I've been doing web dev for many years but the web stack is horribly complicated and low-level once you compare it to the RAD world of shiny desktop development. By the way, Mojolicious (which I've also been using) doesn't solve the UI problem for you. And another one, Mojolicious isn't well tested on Windows (like many script things), and Hypnotoad doesn't do Windows at all.Kerbela
S
3

Continuing on from DavidO's answer, because the current web microframeworks for Perl (I prefer Dancer over his suggestion of Mojolicious, but both are good and largely equivalent) contain their own bundled web mini-servers, they also allow for the app to easily run entirely on the local machine.

Since these mini-servers default to a non-standard port (usually 3000 or 5000) by default and you can easily set them to a different port, they can be isolated by firewalls relatively easily, ensuring that nobody can connect to them remotely. You can also, of course, include and IP address check in the app and have it reject any requests that don't originate from localhost.

Seriema answered 7/6, 2012 at 10:32 Comment(1)
If it's a HTTP::Server::Simple based server it can just bind to localhost so it's not accessible to the outside world (without a tunnel)Agateware
K
2

My guess is that the target system will be Windows. Use a RAD (Rapid Application Development) platform to develop a GUI. Examples for such a platform are Delphi or .NET with C# or VB. For bundling the Perl part, consider using a tool called perl2exe.

It doesn't sound like your scripts should require a web server. Also, consider the installation hassle. Only guessing as you're not giving much information about what your scripts are doing.

Kerbela answered 7/6, 2012 at 7:53 Comment(3)
Indeed it doesn't really require a web server, except maybe for a eventual interface but not for the functionnality itself. Let's say I choose the option of a VB.NET interface execute an perl script bundled with perl2exe, would I then also be able to give arguments and recuperate the output in the VB.NET part ?Braithwaite
@user1441405 (btw, consider changing your number to a name) - Yes, you could use I/O and open pipes to your program and send commands and read the output. Do some googling, that should give you ideas. Or take a look at the section on "Controlling Process I/O" here.Kerbela
Ok thanks a lot for your help (notice I just changed my username. I've actually quickly created an account this morning in order to ask this question :-)). Just for info I'm not a real developer, just a guy building some dirty tool to assist my daily work, that's why questions might sounds stupid sometimes :-)Braithwaite
R
0

I am using the Cava packager to deploy my Perl-written tools. You can even generate an installer executable with just some mouse-clicks. It works pretty well with strawberry Perl and wxPerl on Windows.

Ringtail answered 26/3, 2013 at 8:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.