Advanced Perl: Database-Driven Web Sites

$800.00


  • Virtual Classroom

  • Onsite
Duration: 2 Days

Building on PB Tech's other acclaimed Perl course, Advanced Perl teaches the Perl skills you need to rapidly and efficiently develop complex, database-driven web applications.

What You Will Learn

 

  • Develop faster with CGI.pm shortcuts
  • Build database-driven web applications with the DBI module
  • Remember users with cookies
  • Design a convenient user interface
  • Keep scripts platform-independent

Audience

 

Prerequistes

 

Course Outline

 

1. Introduction

  • The Database Used for the Class
  • A Note About Your Files

2. Shortcuts with CGI.pm

  • Tired of Printing "Content-typeand HTML Tags?
  • Object-Oriented vs. Method-Oriented Perl
  • A More Detailed Example
  • A Template for Creating Your Own Scripts
  • Exercise 1: Using CGI.pm Shortcuts
  • Working with Arrays
  • splice
  • shift
  • unshift
  • push
  • pop
  • Mini-Exercise: Practicing with Array Functions

3. Keep it Portable!

  • The File:Basename Module and $0
  • The Cwd Module

4. Reduce, Reuse, Recycle

  • Avoiding Variable Confusion with my and local
  • Mini-Exercise: Using use strict and my

5. Connecting to a Database

  • Server Architecture
  • A Review of Database Concepts

6. DBI.pm: the Database Interface Module

  • A Sample CGI Script Using DBI
  • Exercise 2: Listing Houses from the Database

7. Error Handling and Prevention

  • Example: Find Agents by Last Name
  • A More Complete Error-Handling Example
  • Exercise 3: Error-Protecting a Search Script

8. Multi-Table Queries

  • Drill-Down Links
  • A More Sophisticated Example
  • Exercise 4: Building Drill-Down Links

9. Inserting Records

  • Building a Dynamic Drop-Down Menu
  • Exercise 5: Inserting a House into the Database

10. Updating Database Records

  • Exercise 6: Updating a House Record

11. Deleting Records

  • Exercise 7: Deleting a House from the Database

12. Uploading Files with CGI.pm

  • Review: Writing to Files in Perl
  • Special Features of File Upload Forms
  • Special Features of the Upload Processing Script
  • Exercise 8: Uploading House Photos

13. File Test Operators

  • Example: a Directory Map
  • Exercise 9: Add Links to House Photos

14. Working with Cookies

  • An Example Page Using Cookies
  • Creating Cookies with CGI.pm
  • Retrieving Cookies with CGI.pm
  • Assigning Arrays to Cookies and Retrieving Them
  • Other Parameters that can be Passed to the cookie() Method
  • Creating Multiple Cookies
  • Exercise 10: Remembering Visitors with Cookies

15. Appendix A: Creating a System DSN

  • How to Create a DSN

16. An Overview of SQL

  • Data Types in SQL
  • Creating a Table in SQL
  • Inserting a Row into the Table in SQL
  • Inserting a Partial Row (or Fields in a Different Order) in SQL
  • Retrieving Information from the Database via SELECT
  • Editing Records in the Database with the UPDATE Statement
  • Removing Records from the Database with the DELETE Statement

17. Downloading Perl Modules

  • Windows: Perl Package Manager
  • UNIX: CPAN.pm

18. Security and Taint Mode

  • Solution: Scrub Your Data with Regular Expressions
  • Ensuring Data Scrubbing with Taint Mode

Course Labs