Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:

Dear Monks,

I am developing a Perl/C pipeline which is placed on an UNIX server. At the moment I am accessing it in Windows through Putty, providing simple command line arguments.

I need to however make it easy to use for non-computer savvy people who use Linux/mac/windows. I am quite good in in making the software work but have no experience in cross-platforms compatibility, networks or GUIs.

Does anyone have any idea what would be the best approach? The user need to submit a string and select multiple options. The program will then run for 2-3 days so it would be nice if there was a way to see the progress, cancel the script and see if it is finished. After it's done I need to visualize the data which atm I provide in excel spreadsheet.

I was thinking about an JavaScript webpage with all the options but don't know is people will be able to access it easily in Windows. Maybe a Java or a Perl GUI?

A multi-platform desktop app that connects to a server would be absolutely ideal but I have no idea how difficult it is to do for someone with limited knowledge of distributed systems.

Any ideas are welcome. I spend a lot of time developing the pipeline but it won't be used a lot unless I make it incredibly easy to access. Thanks in advance for your advice. I am open to learning new stuff and spending 1 or 2 months on it.

Greetings,
No disrespect intended, but generally speaking, the *NIX crowd tend to be pretty savvy
when it comes to "tech stuff". That said, if you have any experience in Perl, you might
want to look into the tk, or gtk Perl bindings/toolkits. Basically put; they allow you
to incorporate buttons, and other widgets into your Perl applications, that will run
on other platforms easily. It would also be worth looking into using CGI. There a massive
collection of freely available modules that provide the "progress-bars" you noted, as well as Jason.
Simply running a search on CPAN forhttp://search.cpan.org/search?query=tk&mode=alltk. Provided a few hundred possibilies.http://search.cpan.org/search?query=gtk&mode=allgtk, gave much the same.

All the above are pertinent for your problem. The solution you choose depend on the user population you address. I am realizing tailor made application for companies and chose the web-application solution.

Depending on the user population I use JavaScript to improve the user experience. If the user population is made of professionals I validate the data only on the server and do not use JavaScript for this purpose. This lowers the development costs.

My solutions base on:

Apache web server (available also for windows)

Apache mod_perl if I need performance is required (probably not your case)

After reading all the comments I am straying towards your solution as I have experience in web design.

The server I am currently working on is a secure, proxied one. In your approach do you create a webpage on the server that users connect to through their desktop browser (providing the password etc. if needed)?

I was thinking about a website that initiates the software after which the user can log off. When logging back the user can see the progress or if the process is done, the results. I don't think it would be difficult to set up?

First notice that my solution need a higher development effort than some other listed here. I would recommend to create the web app on an other server for security reasons. You should have a look at the SSL modules on CPAN to pass the UNIX command to the target server.

I would authenticate the user to the web app with CGI::session and use an PK system to authenticate the web-app to the target server. Eventually jail the account you are using on the target server. Keep the validity time of the cookies of CGI::session short to avoid session theft as far as possible.

Once the user is authenticated I would prepare the UNIX command on the web-app server and pass it to the UNIX server with SSH. If you build a good system (i.e. PERL best practice!) you will be able to reuse the web-app for several UNIX servers.

PS: Never assume a user will log out. Keep the validity of the session short. I use for example 10 minutes for a login screen.

OK, if so - and you want that your GUI looks really cool, please take a look at Flex as well as ActionScript.

IMHO this stuff has some benefits:

Very easy handling of that asynchronous HTTP stuff

Nice data binding concept

ActionScript is how JavaScript should be: typification, class keyword, no need to use prototype. It is a nice language.

Each class you create can have two incarnations: (M)XML and ActionScript code. This goes far beyond that "MarkUp for the Visual Things/Code For The Logic" approach. You can very easily do something similar to Code-Behind.

If you do this and then think about doing some "micro MVC" stuff, things become interesting. Do the basic layout in MXML. Write your classes in ActionScript, based on <s:Group>. E.g. one containing a button, another a data grid for displaying your data and one with some of the XML list objects of Flex for the data and a http service for the fetch as a kind of delegate. A group doesn't listen for any events by default. edit: Bullshit, forgot my own cheated stuff ;-( So overwrite the built-in event dispatcher class see example below, define your custom events , build the listeners and the corresponding handlers, instantiate your AS classes as MXML and the fun begins...

If you AIM for perl based cross platform GUI, Go for GTK. You can develop GUI in GTK Glade GUI builder and only write call backs in perl (Kind of VB approach). I develop many perl based GUI in Perl GTK+, The great http://www.sisyphusion.tk/ repo has perl GTK PPMs for Windows too.

For code examples and screen shots have a look at http://code.google.com/p/saaral-soft-search-spider/

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other