Web Development Primer

CGI

The Common Gateway Interface (CGI) is for executing external applications on Web Servers. Suppose you have an HTML file on your server, and someone makes a request to access that file from his browser; since HTML is static, it won't change, and its content will always be the same. Now say you have a CGI program on your web server, it is executed in real-time, so that it can output dynamic information upon user request. A CGI program can be written in any language that allows it to be executed on the system, such as: C, Perl, TCL, Visual Basic. However, the most popular language is Perl. One problem with CGI is that every request results in another server process which is a huge drain on resources, especially if you're using an interpreted language like Perl. If you're using a compiled language like C it is less of an issue. This performance hit is one reason why CGI is losing popularity these days. Newer scripting languages designed specifically for websites are taking over the server side arena. These scripting languages not only perform better, as they can be processed by a server module, but they're also easier to code since you can include the code inline with your HTML.

Inline Server Side Scripting Languages

Server side scripting languages include PHP, ASP, ColdFusion, and JSP (don't be bamboozled with these acronyms, they will be explained in this article). The role of server side scripting is the same as CGI but with inline server based scripting, instead of the code outputting the lines of the Web page; the Web page itself contains the code. Furthermore, the server usually has the interpreter built in, so it can serve up lots of requests with much lower resource requirements. All of these scripting languages are different, yet the coding fundamentals are the same. So once you learn one the others will be easier.

ASP

ASP stands for Active Server Pages and is a division of Active Platform concept of Microsoft Technologies. To have a better understanding of what ASP is and how it works, let's break the terms:

Active - means that the HTML is created dynamically by your ASP pages. Server - refers to the fact that there is a server involved in the process, thus it is a server-side technology compared. The resulting file is a pure HTML file Pages - means that the HTML file is sent to the browser which displays the HTML content of the ASP file in its window.

ASP is not technically a language, but a framework, however that's getting pretty technical. The ASP command set is comprised of scripts, mostly VBScript, though usage of JavaScript is not uncommon. ASP can be made to interact with ODBC databases to perform data retrieval, storage, sorting etc, and afterwards deliver the result in HTML form. To run ASP pages, you need to have a server that supports ASP or run ISS or Personal Web Server on your local machine. ASP is the language of choice for websites that run on Windows servers.

ASP is great for creating almost any kind of dynamic web content from discussion groups to shopping carts. ASP is ideal for simplifying tasks that would otherwise be very cumbersome or impossible in HTML.