Home
Username:
Password:
Perl Fundamentals Tutorials

Concepts / Dynamic Web content

Subtitles of the Movie

Let's take look now at a dynamic web page request. And we are going to be looking at a request for a CGI script, and CGI stands for the Common Gateway Interface, which is a way of accessing programs or scripts on the web server. And it's also the most typical way that a perl script is run on a server, and that's why we are going to be looking at it in this instance. So first of all the process is started by the user requesting a CGI script. Now this is quite a similar process to the last request that the user made when they requested the static page; all the user needs to do is type in the address, and then the server in a similar way locates the script on the file system. This is where the similarity ends. Once a script is found, it's not returned to the user. In fact that script is hidden and protected and cannot be seen by the user, that is, if the server's security settings are up to scratch. What happens is instead of returning that information directly, the script is actually a program, and the server runs a script, and then the script creates the HTML page on the fly. So there is no actual HTML page written out in full, as there is with our last scenario, but by use of a number of different other resources on the server, the CGI script is able to create an HTML page, which is uniquely suitable to the particular request that the user made. This could be interaction with a database to draw particular information the user's requested, could be interaction with a file system pulling information from flat files, or it could be even talking to other programs. So the script can interact with the other programs, run other programs on the server, and so on. Once the information is being created, the server returns the HTML page to the user, which can be viewed in exactly the same way as the static page could in the previous scenario. The difference here, if you read the little blurb there in the browser, is that this dynamic page was created by the perl script. And used as a content resource, a database server. A database server being another process running on the server machine. So the data that the user is seeing is actually pulled selectively from a database, rather than simply returning a single HTML page that the server found in its file system. Didn't have to be a database, but that's a pretty simple and typical example for what a dynamic web page request consists of. So that's the essential difference between static and dynamic web content, and that's the part where perl comes into play to deliver such content.

Tutorial Information

Course: Perl Fundamentals
Author: Joshua Mostafa
SKU: 33403
ISBN: 1-9320-7215-2
Release Date: 2002-12-19
Duration: 7.5 hrs / 113 lessons
Work Files: Yes
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available