In our last episode,
the lovely and talented (e-mail address removed)
broadcast on comp.lang.perl.misc:
Just look at the Larry Wall home page to see that this is true. On the
other hand, I have found CGI programming via CGI.pm is the best user
interface to Perl programs.
As it happens, I was working on the README for my small
databases manager (to use a number of databases similar to and
including various old DOS-type databases, spreadsheets, and
various "office suite" type applications -- no, it is not nearly
done, but I tend to document as I go because I am too senile to
remember what I did yesterday if I haven't documented) and I was
trying to explain (in the README) why a cgi interface for a
program that is *not* intended for a public server on the
world-wide web.
You see, there just is no trick to programming. It is easy.
And anyone with a computer should give it a try. The trick -
what the professionals get paid for - is making programs run on
many different computers, with many different OSs, i/o devices,
etc. That stuff is really, really hard - and there are dozens,
even hundreds, of vendors out there trying all the time to
produce new hardware to break your application.
But html forms have a fairly complete toolkit for data input,
html has an adequate way of marking up output, and most browsers
do a pretty good job of presenting html documents - particularly
if you give them a chance to do their jobs instead of trying to
throttle them into absolute presentational subservience (and if
you trust users to configure their browsers in a way that is
most comfortable for them).
CGI takes care of the nasty stuff so even an idiot can write
programs that do useful things. There ought to be a word for
not-necessarily-for-the-web cgi programming.
Here's a hint, even if you have a local server, lynx - compiled
and configured for lynxcgi if it is available for your platform
- is a really helpful tool for working on these kinds of
applications.
I'd be happy to know of other browsers that have some scheme for
running cgi without a server (not that it is brain surgery - the
browser just has to provide a - usually - minimal environment,
launch the script, and catch and render the output). I run a
server locally, and at some point I move applications to it for
testing. But at the still-sort-of-vague-on-things level,
browser cgi is great. And for personal-type applications,
browser cgi might be the best solution.