Freelance Writing Jobs | Today's Articles | Sign In

 
Browse Sections

CGI and VBScript


Common Gateway Interface (CGI)

Common Gateway Interface (CGI) is one of several ways you can use to add interactivity to your Web pages. CGI represents a simple protocol of communication between the Web forms and the programs that reside on the Web server. This is a quite different technology then VBScript which is included in the HTML file implemented on the client side. 

CGI scripting performs tasks like connecting your (client)  Web site to a database, which enables clients to easily browse and search the product catalog. Transport companies can set up sites that let their customers inquire about traffic schedules and make reservations online. Banks can set up Web sites that enable their customers to check balances and make transfers. Libraries can set up sites that enable readers to search for books and magazines.

A CGI script or program gets its input from the Web forms, processes it, and sends the results back to your browser. CGI is not a programming language; it is a script or a program that resides on the server. CGI represents a simple communication protocol that establishes the communication layer between the server and the server-side applications. You can create a CGI script or program using almost any programming language, such as C/C++, Visual Basic, Perl, FORTRAN, or AppleScript, that supports standard input and output processing. Since VBScript does not have built-in functions to communicate with computer system resources VBScript can not be used for CGI programming. However, VBSCript can be run on server for Active Server Scripting which provides the similar way for client-server communication as CGI.

A CGI program is an executable, similar to the executables you create for your desktop client/server applications. If you use a scripting language such as Perl, you create a CGI script. You will find it easier to create and maintain a script. A number of scripts exist on the World Wide Web that do the preceding conversion. These scripts come in a number of different languages, including the Bourne Shell, C, Perl, Perl5, TCL, and many more. Any changes made to a program must undergo the compile, link, and build process before the program can be executed. Whether you choose to create a program or script depends on the tool you plan to use. The choice of tool depends on your familiarity with the tool and its programming syntax and structure. If you programmed with C/C++ all your life, you may feel better using C/C++ to write your CGI programs. In fact, you may be able to reuse your library of C/C++ routines for some of your CGI programs. On the other hand, if you are a Visual Basic developer, you probably want to continue using it to write your CGI programs. Many vendors supply special Application Programming Inteface (API) functions to support CGI. These include Netscape's NSAPI (Netscape Server Application Programming Interface) and Microsoft's ISAPI Internet Server Application Programming Interface).

The copyright of the article CGI and VBScript in VB Script is owned by Maxim Karetnikov. Permission to republish CGI and VBScript in print or online must be granted by the author in writing.

Go To Page: 1 2

Articles in this Topic    Discussions in this Topic