CGI Programming with Perl (2 days)





Synopsis

This course teaches the student to create Perl-based CGI scripts to provide dynamic content on web pages. In addition to standard form processing, such topics as server-side includes, cookies, and image maps will be covered.

One often-overlooked topic provided by this course is the use of HTML templates -- predefined web pages that can be "filled in" with data. This allows a web designer to do the actual HTML layout, freeing the programmer to concentrate on the data.

This fast-paced course emphasizes practical techniques and wherever possible uses standard, freely available software (e.g. Perl modules) to prevent "reinventing the wheel".



Target audience

This course is for web programmers.

Prerequisites

To successfully complete this course, the student must have a basic knowledge of Perl. No CGI experience is required.

Lab exercises

This course provides many hands-on labs which begin with simple CGI scripts which process URL information, building up to template-driven HTML output with form processing and correction

Course materials

In addition to the course manual, students will receive a copy of the comprehensize reference Webmaster in a Nutshell by Spainhour & Quercia, published by O'Reilly & Associates.

Course Outline

1. Basic HTML

  • Understanding tag syntax
  • Structural tags
  • Font oriented tags
  • Lists and other special tags
  • Forms
  • Tables

2. CGI overview

  • Before CGI
  • Static vs dynamic content
  • How CGI works
  • CGI output options
  • Alternatives to CGI

3. Processing forms

  • The <FORM> tag
  • Form widgets
  • Processing form data
  • Creative approaches to data organization

4. Using CGI.pm

  • What CGI.pm provides
  • Creating and using CGI objects
  • Basic form and URL processing
  • Using the output routines
  • Advanced concepts

5. Saving user information

  • The problem with basic HTTP
  • Using hidden fields
  • Error detection and HTML generation
  • About cookies
  • Using cookies
  • Cookies and security

6. Using HTML templates

  • Why use templates?
  • Basic template creation
  • Painless template processing
  • Generating lists
  • Generating links

7. Server-side includes

  • What is SSI
  • SSI syntax
  • Server configuration
  • Security issues

8. Working with Images

  • Displaying images
  • Using images for form buttons
  • Creating imagemaps
  • imagemap tools

9. JavaScript

  • What is JavaScript
  • JavaScript is not Java
  • Mechanics of the <SCRIPT> tag
  • Using JavaScript for mouse-over help
  • Using JavaScript for field data validation
  • Drawbacks of JavaScript


Downloadable files for this course: