web application development with active server pages david henson [email protected]

38
Web Application Development with Active Server Pages David Henson [email protected] http://www.certifiednetworks.com

Upload: paul-dawson

Post on 18-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Web Application Developmentwith

Active Server Pages

David Henson

[email protected]

http://www.certifiednetworks.com

Page 2: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Introduction

Page 3: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Class Logistics

• 7 Meetings

• Class Hours – 6:30 to 9:30

• 2 Short Breaks Per Night

• Book: Alex Homer’s Professional ASP 3.0 Web Techniques – WROX Press

• Handouts

Page 4: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Classroom Setup

• NT4

• IIS

• SQL7

• MDAC 2.5

• Internet Explorer 5

Page 5: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Course Overview

• Definitions

• Module 1 – Overview

• Module 2 – Structure of ASP

• Module 3 – Browser/Server Communication

• Module 4 – Database Connectivity

• Module 5 – Updating Data

Page 6: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Course Overview, Contd.

• Module 6 – Advanced SQL7 Techniques for Dynamic Sites

• Module 7 – Security

• Module 8 – Email Communication

• Module 9 – Logging Visits

• Module 10 – Dealing with Browsers

Page 7: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Course Overview, Contd.

• Module 11 – OLE Automation

• Module 12 – XML

Page 8: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Definitions

• ASP

• IIS

• SQL

• HTML

• HTTP

• SSL

• Tags

• Browser

• IP Address

• ADO

• OLE/DB

• COM

• GUID

Page 9: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 1 – Overview

• Client Server Communication

• On the Back End

• On the Front End

• Software Configuration

• Networking

Page 10: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Client Server Communication

Page 11: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

On the Back End

• Many Available Options:– UNIX/LINUX, NT

– Apache, IIS

– ASP, Perl, PHP, C++, VB

Page 12: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

On the Front End

• Internet Explorer

• Netscape

• Others

• PDAs – Palm Pilot, Windows CE

• Cell Phones, Voice Mail Gateway

• Crawler, Spider, Other Automated Engines

Page 13: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Software Configuration

• Common Settings for IIS – Virtual Server

– Virtual Site with host headers

• Common Settings for NT/Windows 2000– Securing Data with NTFS

Page 14: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Networking

• Name Resolution– DNS, WINS, LMHOSTS

• Mapping Drives

• FTP

Page 15: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 2 – Structure of ASP

• HTML Tags

• ASP Tags

• Server Side Includes

• Intrinsic Objects– Request, Response, Server, Application, Session

• Demonstration – Structure of ASP

Page 16: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Common HTML Tags

• <TABLE></TABLE>

• <TR></TR>

• <TD></TD>

• <FORM></FORM>

• <META>

• <BODY></BODY>

• <BR>

• <P></P>

• <B>

• <FONT>

Page 17: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Common ASP Tags

• <SCRIPT RUNAT=“Server”> </SCRIPT>

• <% %>– <%=variable%>

Page 18: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Common VBScript Syntax

• Set

• If…then

• While

• String Manipulation-– Left(string, 4)

– Right(string, 4)

– Mid(string, 4, 2)

Page 19: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Server Side Includes

• <!--#Include file=“CheckVars.asp”-->

• <!--#Include virtual=“CheckVars.asp”-->

Page 20: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Intrinsic Objects

• Application

• Response

• Server

• Session

• Request

• ObjectContext

Page 21: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Demonstration – ASP Structure

Page 22: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 3 – Communicating Between Browser and Server

• Forms

• Hidden Inputs

• Request Object

• Application Object

• Session Object

• Other Objects

• Lab – Browser/Server Communication

Page 23: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

FormsDemo.asp

<%

If not request(“somedata”) = “” then

response.write(“The data is:” & somedata & “<br>”)

end if

%>

<FORM ACTION=“Demo.asp” METHOD=“POST”>

<input type=“text” name=“somedata”>

<input type=“submit”>

</FORM>

Page 24: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Hidden Inputs

<input type=“hidden” name=“test” value= “<%=request(“test”)%>” >

Page 25: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Request Object

• Exposes for use:– Form Data

– Href parameters

Page 26: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Application Object

• Starts up when the first user hits the site

• Ends when the server is shut down

Page 27: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Session Object

• Relies on cookies

• Makes information persistent between pages

• Can be troublesome:– DNS Round Robin

– Load Balancing

– Timeout, Cookies not allowed by browser

Page 28: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Session Example

Session(“userid”) = request(“userid”)

Page 29: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 4 – Database Connectivity

Page 30: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 5 – Updating Data

Page 31: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 6 – Advanced SQL 7 Techniques

Page 32: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Lab – Browser/Server Communication

Page 33: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 7 – Security

Page 34: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 8 – Email Communication

Page 35: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 9 – Logging Visitors

Page 36: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 10 – Dealing with browsers

Page 37: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 11 – OLE Automation with Excel and Other Objects

Page 38: Web Application Development with Active Server Pages David Henson dhenson@certifiednetworks.com

Module 12 - XML