[tpm] Simple web pages

J. Bobby Lopez jbl at jbldata.com
Thu Jul 3 15:20:32 PDT 2014

IMO, depends on how long you expect it to stick around.  If it's a
one-off thing you need right now, and plan to throw away, then you can
probably hack something together with CGI and just have HTML links point
directly to those scripts to execute them.

This is not recommended.  Rarely do one-off tools actually go away
(especially if they are useful and get the job done), so I'd suggest you
start with something a little more robust like a simple Dancer app with
bootstrap or flatUI.

You don't immediately need to get fancy with any UI tool-kit, you can
just use the framework as a starting point, and still implement simple
links that trigger routes, which in turn run some perl code in the
background.  The point of starting with a robust tool-kit first (as
opposed to coding everything from scratch or using CGI) is basically to
shield yourself from getting too deep in feature-creep without a solid
underlying UI framework to make things easier going forward.

There are also a few things here to consider.  The "Perl apps in the
background".. do they return plan-text, HTML, or anything at all?  You
would have to write in a way handle the results of the execution, and
bring those results into the GUI (if required).  Even if its just
returning plain-text, if you plain to bring any of those kinds of
results into the browser, you'll be getting into HTML forms/divs/css
(possibly javascript), which will be easier to handle if you're on a
structured framework.

I haven't really done a lot of perl over the last year or so, but I
recently whipped up a Dancer + bootstrap app pretty quickly because the
structure and process for writing/promoting code became very
familiar.    So if I ever need to write a web-based tool, I just use the
same idea (either on the Perl side using Dancer or the Ruby side using
Sinatra) to spin something up quickly.


J. Bobby Lopez

On 14-07-03 05:57 PM, arocker at Vex.Net wrote:
> If you wanted to use a simple html page in a browser, as a GUI controller
> to invoke Perl programs in the background, what modules would you use for
> the interaction? CGI or something else?
> If anyone knows of an example of this, I'd be interested to hear about it.
> _______________________________________________
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm

More information about the toronto-pm mailing list