Web.pm or something (Re: the CGI.pm in Perl 6)
At 3:21 PM +0200 9/12/06, Thomas Wittek wrote: So I think that there should be a (well designed) module for those lower level (donkeywork) tasks and only for those (so definitely no HTML-generation...). I strongly suggest that if we're going to do things this way, which sounds like a good idea, then the new and well designed lower level module should NOT be named "CGI.pm" ... if nothing else, it is because that name sends the wrong message in today's age. The word "CGI" generally speaks to an old, weak, and relatively inefficient technology ... modern proper stuff does not spin off a separate process for each server request; it reuses an existing server ala mod_perl. But this module in question should provide a low level layer that one can use without changes regardless of whether the script is running in CGI mode, or under mod_perl or ISAPI or as a pure-Perl server or on the command-line. As for "Web.pm", that may work better, but are there any reasonably conceivable uses outside HTTP/HTTPS stuff that may invalidate the name? Either way, I agree; no HTML generation in this core module. Just management of our server-side view of web client input and output. In fact, it may borrow a few pages of design from LWP if applicable? -- Darren Duncan
Re: Web.pm or something (Re: the CGI.pm in Perl 6)
On Tue, Sep 12, 2006 at 03:08:03PM -0700, Darren Duncan wrote: > The word "CGI" generally speaks to an old, weak, and relatively > inefficient technology ... modern proper stuff does not spin off a > separate process for each server request; it reuses an existing > server ala mod_perl. To me the Commong Gateway Interface means a standard method for dealing with data supplied by the user, nothing more. It certainly doesn't specify how you should implement it. Indeed, every mod_perl application I've seen uses CGI. -- David Cantrell | A machine for turning tea into grumpiness Just because it is possible to do this sort of thing in the English language doesn't mean it should be done
Re: Web.pm or something (Re: the CGI.pm in Perl 6)
At 5:00 PM +0100 9/13/06, David Cantrell wrote: On Tue, Sep 12, 2006 at 03:08:03PM -0700, Darren Duncan wrote: > The word "CGI" generally speaks to an old, weak, and relatively inefficient technology ... modern proper stuff does not spin off a separate process for each server request; it reuses an existing server ala mod_perl. To me the Commong Gateway Interface means a standard method for dealing with data supplied by the user, nothing more. It certainly doesn't specify how you should implement it. Indeed, every mod_perl application I've seen uses CGI. I beg to differ. "CGI" is very much an implementation detail. It is a gateway protocol for how 2 different processes communicate. See: http://www.w3.org/CGI/ An HTTP server is often used as a gateway to a legacy information system; for example, an existing body of documents or an existing database application. The Common Gateway Interface is an agreement between HTTP server implementors about how to integrate such gateway scripts and programs. And: http://en.wikipedia.org/wiki/Common_Gateway_Interface The Common Gateway Interface (CGI) is a standard protocol for interfacing external application software with an information server, commonly a web server. This allows the server to pass requests from a client web browser to the external application. The web server can then return the output from the application to the web browser. Because this technology generally requires a fresh copy of the program to be executed for every CGI request, the workload could quickly overwhelm web servers, inspiring more efficient technologies such as mod_perl or ASP that allow script interpreters to be integrated directly into web servers as modules, thus avoiding the overhead of repeatedly loading and initializing language interpreters. So "CGI" is absolutely not a good name for a new and modern module's design where the module's functionality isn't CGI-specific. -- Darren Duncan