Introduction to Perl CGI web developemnt
Posted Under (Perl) by Ramraj Edagutti on May Fri, 2009
No CommentsCommon Gateway Interface
The Common Gateway Interface(CGI) is a standard protocol for web communication between HTTP server or web server and a CGI sciprts/programs. In other terms, CGI is specification for data transmission between web server and CGI programs. Basically, web servers are the one who implements the CGI specifications.
The main job of the web server(also called HTTP server) is to take the user request from browser and execute specific CGI programs which resides in the web server and generate the output and then send it back to the browser for display. In between, browser is a client side program which knows how to talk to web server and get back the respose to display to the end user. Internet Explorer, Mozilla firefox, Opera, Apple’s safari and Google chrome are the most popular web browsers used in the world.
CGI programs can be implemented in any programming language such as C, C++, perl, and python etc. Among all these Perl is the most popular choice for CGI web development.
Common uses of Perl CGI programming
- To process the HTML forms
- To provide dynamic website feedback
- To generate dynamic web pages
- To develop large and enterprise/business web applications
There is one problem with CGI scripts that every time web server receive a request for CGI script it spawns a new process to execute the script. This puts lots of load on web server specially for website which has millions of page views. Due to this reason java servlets are superseded the CGI programming in web development.
