Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The "obsolete"-ness of CGI is really only a factor if you are doing big, complex sites with lots of page views. </p> <p>Many people push the idea that CGI is obsolete don't really understand what CGI is. There is a widespread misconception that CGI is an inherently Perl-based technology. Many people attack CGI as a way to pad out cultic attacks on Perl in support of whatever language they support. If you want to be a real technologist, you need to understand the fundamental issues and make a choice based on the facts of the situation.</p> <p>CGI is an interface with a webserver that allows you to write interactive pages in any language--<a href="http://quadium.net/funge/name.bf" rel="noreferrer">even befunge</a>. When a server gets a request for a page controlled by a CGI script, the server runs the script and returns the results to the requester.</p> <p>If your programming language requires a VM, interpreter or compiler to load each time it executes, then this start-up time will be required each time your page is accessed.</p> <p>CGI accelerators like FastCGI, mod_php, mod_perl and so forth, keep an interpreter/VM in memory at all times, may keep libraries loaded, and even cache bytecode from scripts to reduce script start-up overhead.</p> <p>If you are making a simple, personal or hobby site, CGI will be fine. So will PHP.</p> <p>If your site should grow to need a faster technology, you can move to mod_perl, FastCGI, or other CGI acceleration technologies.</p> <p>What language you use should be determined by the tools it provides and how they fit with your needs. </p> <ol> <li>Make a list of the capabilities you need. </li> <li>Make a list of deal breakers. </li> <li>Now check each of your possible toolsets against these two lists. </li> <li>Which one comes out the best? Test it.</li> <li>Does it suck? Cross it off your list, and go back to step 4.</li> </ol> <p>Also, I recommend against using <a href="http://en.wikipedia.org/wiki/Befunge" rel="noreferrer">befunge</a>. Just because it is possible, it doesn't mean you should use it.</p> <hr> <p><strong>Update:</strong> As mpeters points out, mod_perl, mod_php, mod_ruby, et alia are much more than mere CGI accelerators; they provide access to the Apache API. They act as CGI accelerators, but can do much, much, more.</p> <p>FastCGI is a pure CGI accelerator.</p> <p><strong>Update 2:</strong> PHP and CGI are not mutually exclusive. <a href="http://us3.php.net/security.cgi-bin" rel="noreferrer">PHP can be installed as a CGI</a>. PHP is often used with FastCGI.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload