101
Copyright © 2002 ProsoftTraining. All rights reserved. Dynamic Server Pages

Copyright © 2002 ProsoftTraining. All rights reserved. Dynamic Server Pages

Embed Size (px)

Citation preview

Copyright © 2002 ProsoftTraining. All rights reserved.

Dynamic Server Pages

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 1:Introduction

to PHP

Objectives

• Define PHP• Identify platforms and Web servers that

support PHP• Describe the installation and configuration of

PHP• Discuss add-on modules used with PHP• Create a Web publishing directory

What Is PHP?

• Server-side scripting language• Embedded in HTML documents• Known as PHP Hypertext Preprocessor

Supported Platformsand Web Servers

• PHP modules• CGI interpreter or Apache module?

Installationand Configuration

• Installing MySQL• Installing PHP

Summary

Define PHP Identify platforms and Web servers that

support PHP Describe the installation and configuration of

PHP Discuss add-on modules used with PHP Create a Web publishing directory

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 2:PHP Fundamentals

Objectives

• Describe the structure of PHP pages• Define variables and data types• Discuss and use constants• Discuss variable functions• Define and use operators

PHP Mechanics

• Script delimiters• Page structure• Containers• Comments

PHP Variables

• Data types– Integer– Double– String

• Constants• Type casting• Variables and form data

PHP Operators

• Operator precedence

Summary

Describe the structure of PHP pages Define variables and data types Discuss and use constants Discuss variable functions Define and use operators

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 3:PHP Statementsand Flow Control

Objectives

• Describe and use conditional statements• Define and use switch statements• Define and use for loops• Define and use while loops

ConditionalStatements

• if statements• switch statements

Loops

• for loops• while loops

Summary

Describe and use conditional statements Define and use switch statements Define and use for loops Define and use while loops

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 4:PHP Arrays

Objectives

• Describe and use PHP arrays• Discuss associative arrays• Discuss multidimensional arrays• Sort PHP arrays

PHPArrays

• Associative arrays• Multidimensional arrays• Sorting arrays

– The sort ( ) and assort ( ) functions– The array_multisort ( ) function

Summary

Describe and use PHP arrays Discuss associative arrays Discuss multidimensional arrays Sort PHP arrays

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 5:PHP Functions

Objectives

• Define and use functions• Explain and use the function statement• Pass arguments to PHP functions• Return values from PHP functions• Explain variable scope in PHP• Assign a function to a variable

PHPFunctions

• The function statement• Passing arguments• Variable scope• Assigning a function to a variable

Summary

Define and use functions Explain and use the function statement Pass arguments to PHP functions Return values from PHP functions Explain variable scope in PHP Assign a function to a variable

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 6:String Manipulation

and File Input/Output

Objectives

• Discuss PHP string functions• Describe and use regular expressions• Define and use pattern matching• Open and close files on the server• Write to and read from files on the server• Create and use flat database files

String Functions

• strlen() function• substr() function• strpos() function• trim() function• strtolower() and strtoupper() functions• ucfirst() and ucwords() functions• printf() and sprintf() functions

Regular Expressionsand Pattern Matching

• Common escape sequences• Built-in character classes

RegularExpression Functions

• ereg() and eregi() functions• ereg_replace() and eregi_replace()

functions

File Inputand Output

• Opening files• File mode specifiers• Reading files• Writing to files• Moving within files

Summary

Discuss PHP string functions Describe and use regular expressions Define and use pattern matching Open and close files on the server Write to and read from files on the server Create and use flat database files

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 7:PHP and

Databases

Objectives

• Explain the basics of databases• Explain database structure and schemas• Define and use SQL• Discuss cursors and result sets• Define stored procedures• Add records to and search a database• Update and delete records from an ODBC-

compliant database

RelationalDatabases

• Tuples• Attributes• Objects

Primary Keysand Foreign Keys

Integer ID

Double Balance

Boolean Checking

Integer ID

String FName

String LName

String AddressDate StartDate

Integer Customer

BankAccount Table Customer Table

Structured Query Language (SQL)

• Data Definition Language (DDL)• Data Query Language (DQL)• Data Manipulation Language (DML)

Cursors and Result Sets

• ResultSet = RecordSet• Loop construct• The next() method

ODBC

• ODBC and PHP• ODBC functions• The PHP application

Summary

Explain the basics of databases Explain database structure and schemas Define and use SQL Discuss cursors and result sets Define stored procedures Add records to and search a database Update and delete records from an ODBC-

compliant database

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 8:Debugging PHP

and PHP Security

Objectives

• Explain debugging PHP applications• Describe errors and error handling• Describe PHP security issues• Explain safe mode

DebuggingPHP Applications

• Syntax errors• Runtime errors• Logical errors• Error messages in PHP

– Parse errors– Fatal errors– Warnings– Notices

• Error handling

Preventing Errors

• Script by design• Keep the script simple• Adhere to strict naming conventions• Use a modular approach

PHPSecurity Issues

• Securing the server• Settings• Configuration options• Safe mode• Writing secure PHP applications

Summary

Explain debugging PHP applications Describe errors and error handling Describe PHP security issues Explain safe mode

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 9:Active

Server Pages (ASP)

Objectives

• Define an ASP file and ASP-based applications• Describe ISAPI programs• Discuss the Web servers that support ASP

applications• Describe the structure of ASP technology• Define and create virtual directories• Define and use server-side include files• Create and use a global.asa file

Introduction

• Microsoft Internet Information Server• Internet Server Application Programming

Interface

ASP Mechanics

• Dynamic link library• Comparing ASP and other technologies• ODBC• Out-of-process• In-process

Virtual Directoriesand ASP Applications

• Virtual directories are mappings between a name and an actual path to a real directory

• Virtual directories contain:– global.asa file– default.htm or default.asp

ASP Delimiters

• Server-side includes• ASP support for scripting languages

Global.asa—Starting a Web Application

• Global.asa defines the properties of a Web application

Summary

Define an ASP file and ASP-based applications Describe ISAPI programs Discuss the Web servers that support ASP

applications Describe the structure of ASP technology Define and create virtual directories Define and use server-side include files Create and use a global.asa file

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 10:Using VBScript

Objectives

• Identify and use VBScript operators and expressions

• Define and use VBScript variables and data types

• Declare VBScript arrays• Define and use conditional statements and

looping constructs• Create subroutines and functions

VBScript

• Scripting languages• Scripting engines

Differences BetweenVBScript and JavaScript

• Calling functions and subroutines• Function calls and implementation in

JavaScript and VBScript• Event-driven programming

DeclaringVariables with VBScript

• Declaring variables– Dim keyword– Public keyword– Private keyword

• Naming variables• Arrays, ReDim, and Preserve• Collections• Option Explicit• Data subtypes and conversion functions

Program Flow

• If statements• Select Case statements• Looping constructs• For…Next statements• Do… loops• While…Wend statements

Summary

Identify and use VBScript operators and expressions

Define and use VBScript variables and data types

Declare VBScript arrays Define and use conditional statements and

looping constructs Create subroutines and functions

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 11:ASP

Intrinsic Objects

Objectives

• Identify and use ASP intrinsic objects• Define and use properties and methods of

ASP objects• Use the Request and Response objects• Identify Server object properties• Identify the ObjectContext object• Discuss object scope

ASP Objects

• ScriptingContext• Server• Application

• Session• Request• Response

Summary

Identify and use ASP intrinsic objects Define and use properties and methods of

ASP objects Use the Request and Response objects Identify Server object properties Identify the ObjectContext object Discuss object scope

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 12:ASP DefaultComponents

Objectives

• Identify and use ASP default components• Define and use properties and methods of

ASP components• Create and write to a flat database file

Global Objects

• <OBJECT> tag• ID parameter• ProgID parameter• ClassID parameter

ASP DefaultComponents

• Ad Rotator• Browser Capabilities

• Content Linking• Content Rotator• Counters

• Page Counter• Permission Checker

• FileSystemObject• ActiveX Data Objects

Summary

Identify and use ASP default components Define and use properties and methods of

ASP components Create and write to a flat database file

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 13:ActiveX

Data Objects

Objectives

• Define ODBC and OLE DB• Define and use ADO• Define and create DSNs• Insert records into a database using ASP and

ADO• Update and delete records in a database using

ASP and ADO

Open DatabaseConnectivity and OLE DB

ActiveXData Objects

RegisteringData Source Names

• User DSNs• System DSNs• File DSNs

Summary

Define ODBC and OLE DB Define and use ADO Define and create DSNs Insert records into a database using ASP and

ADO Update and delete records in a database using

ASP and ADO

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 11:Error Handling and Debugging

for ASP Applications

Objectives

• Discuss debugging ASP applications• Discuss errors and error handling• Define the VBScript Err object• Describe and create custom error numbers• Discuss error logging• Discuss the Microsoft Script Debugger

DebuggingASP Applications

• Handling errors• The Err object• Logging errors• Microsoft Script Debugger

Summary

Discuss debugging ASP applications Discuss errors and error handling Define the VBScript Err object Describe and create custom error numbers Discuss error logging Discuss the Microsoft Script Debugger

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 15:Project Management

in Application Development

Objectives

• Discuss project management fundamentals• Define source and revision control• Discuss coding standards• Define code optimization• Define and use a test assessment plan• Discuss application testing both before and

after deployment

Project Management Fundamentals

• What is project management?– Business process/functionality design– Technology/architecture design– Implementation/development– Pilot/parallel– Cutover/live

• Further study– PMI– ISO 9000 series

Source andRevision Control

• Program code control• Version-control software• Revision Control System (UNIX)• Source Code Control System (UNIX)• Visual SourceSafe (Microsoft)

Coding Standards

• Indentation and margins• Matching brackets• Parentheses• Reserved words and keywords• Naming conventions• Language constructs• Comments• Error handling

Code Optimization

• Loops• General optimization tips

– Variables– Arrays

• ASP optimization

Test Assessment Plans

• Creating a test plan• Glass-box testing• Black-box testing• Post-live testing

Summary

Discuss project management fundamentals Define source and revision control Discuss coding standards Define code optimization Define and use a test assessment plan Discuss application testing both before and

after deployment

Copyright © 2002 ProsoftTraining. All rights reserved.

Lesson 16:Data Integrity

and Security Issues

Objectives

• Discuss basic database construction issues• Explain data integrity• Define various mechanisms for insuring data

integrity• Discuss the different goals of security• Explain the basis of encryption• Examine the different protocols used as

encryption is applied to various situations

DatabaseDesign Fundamentals

• Designing the database• Data integrity• Data input anomalies

DatabaseSecurity Issues

• Data Control Language• Other security-related issues

– Hardware volatility and failure– Concurrent access

• User authorization• General security information

Security Goals

• Transmission integrity• Authentication• Secrecy

Encryption

• Algorithm• Key

– Key length– Key space

Symmetric, Asymmetric, and One-Way Algorithms

• Symmetric encryption example– Rot-13

• One-way encryption• Public-key encryption• Private-key encryption

Protocols

• Authentication and digital signatures• Diffie-Hellman key exchange and certificate

authorities• X.509 format

Summary

Discuss basic database construction issues Explain data integrity Define various mechanisms for insuring data

integrity Discuss the different goals of security Explain the basis of encryption Examine the different protocols used as

encryption is applied to various situations

Dynamic Server Pages

Introduction to PHP PHP Fundamentals PHP Statements and Flow Control PHP Arrays PHP Functions String Manipulation and File Input/Output PHP and Databases

Dynamic Server Pages

Debugging PHP and PHP Security Active Server Pages (ASP) Using VBScript ASP Intrinsic Objects ASP Default Components

Dynamic Server Pages

ActiveX Data Objects Error Handling and Debugging for ASP

Applications Project Management in Application

Development Data Integrity and Security Issues