|
Posted by Alan J. Flavell on 08/28/05 14:45
On Sat, 27 Aug 2005, Toby Inkster wrote:
> CGI is a rather outdated mechanism for server-side programming.
CGI specifies an application programming interface between a web
server and a server-side process. RFC3875 is an informational RFC with
a detailed specification of the software interface.
The server-side process can be programmed in any language which is capable
of supporting the interface specification. There's a wide range of
choices (I'm told that there exist CGI processes programmed in COBOL,
though I've never seen one myself).
The "mechanism" is decided by the server implementer.
> It's inefficient. It spawns a whole new process for each page request.
It's often implemented in that way, but where does the specification
require that?
> mod_php on the other hand is run in-process by the web server.
Comparing chalk with cheese. PHP is a lot more than just a programming
interface specification, and a lot less than a complete implementation
which can support server-side code in any programming language.
> In the face of such modules, CGI is outdated.
CGI is very portable, on the other hand. This can be an overwhelming
reason for choosing it, when other considerations aren't dominant. Beware
premature optimisation.
[Back to original message]
|