is 4506 interactive clients & servers. overview fat client versus fat server spectrum of web...

25
IS 4506 Interactive Clients & Servers

Upload: jesse-griffin

Post on 02-Jan-2016

220 views

Category:

Documents


3 download

TRANSCRIPT

IS 4506

Interactive Clients & Servers

Overview

Fat Client versus Fat Server

Spectrum of Web content formats

Active Server Pages

Active Server Page elements

Use of the script tag

Client /Server Architecture

Server

PCs

Middleware

Web Client/Server Architecture

Client Web Browser

HTTP Server

INTERNET INTRANET

Spectrum of Web Content Formats

Personalization and Transaction Processing

StaticStatic

ActiveActive

Linked (Basic)Content

Dynamic HTML

Data-bound Applications

Interactive Applications

Active Server Pages

Dynamic content

Easy database connectivity

Scalable server-side solution

Integrated state and user management

Reusable software model

Active Server Page Elements

ASP scripts

Objects

ASP built-in objects

Installable ASP objects

Installable ASP components

Component creation

ASP Scripts

Flexible server-side scripting

Exposes object model

Components accessed using properties and methods

Temperature conversion example

VBScript code

Objects

ASP built-in objects

Installable ASP objects

ASP Built-in Objects

Server Object

Application Object

Session Object

Request Object

Response Object

ObjectContext Object

Component Creation

Created in any language

Components follow the COM standard

Accessed only by the server

Extend ActiveX server components

Use of the Script Tag

Script tag on Active Server Pages

<%

Code

%>

ASP Examples

Hello.htm

Hello.asp

Form.htm

Hello.htm

<HEAD><TITLE> Static Hello</TITLE></HEAD>

<BODY><FONT SIZE = 7 >

Hello World!<BR>

</FONT></BODY></HTML>

Hello.asp<%@ LANGUAGE = VBScript %><HEAD><TITLE>Active Hello Page</TITLE></HEAD><BODY>

<% For I = 3 To 7 %><FONT SIZE=<%= I %>>Hello World!<BR><% Next %></FONT>

</BODY></HTML>

Form.htm

<HTML><HEAD><TITLE>Order</TITLE></HEAD><H2>Sample Order Form</H2><P>Please provide the following info, then click Submit:</P>

<FORM METHOD="POST" ACTION="response.asp">Title: <INPUT NAME=“title” SIZE=“5”><BR>First Name: <INPUT NAME="fname" SIZE="48"><BR>Last Name: <INPUT NAME="lname" SIZE="48">

<P><INPUT TYPE=SUBMIT><INPUT TYPE=RESET></P></FORM></BODY></HTML>

Response.asp

<%@ LANGUAGE = VBScript %>

Thank you, <% Title = Request.Form("title") LastName = Request.Form("lname")If Title = "mr" Then %> Mr. <%= LastName %> <% ElseIf Title = "ms" Then %> Ms. <%= LastName %> <% Else %><%= Request.Form("fname") & " " & LastName %><% End If %> for your order.<BR>

Response2.asp<%@ LANGUAGE = VBScript %><% Title = Request.Form("title") LastName = Request.Form("lname")FirstName = Request.Form("fname")

Response.Write "Thank you " If Title = "mr" Then

Response.Write "Mr." & LastName ElseIf Title = "ms" Then

Response.Write "Ms." & LastName Else

Response.Write FirstName & " " & LastNameEnd If Response.Write " for your order!!"%>

mail.asp

<%@ LANGUAGE = VBScript %><%Dim MessageSet message = CreateObject("CDONTS.NewMail")message.send Request.Form("From"), Request.Form("To"), Request.Form("Subject"), Request.Form("text")Set message = Nothing%>

The Following Email Has Been Sent: <p>From: <%= Request.Form("From") %> </p><p>To: <%= Request.Form("To") %> </p><p>Subject: <%= Request.Form("Subject") %> </p><p>Text: <%= Request.Form("text") %> </p>

Lab 11: Active Server Pages

Review

Spectrum of Web content formats

Active Server Pages

Active Server Pages elements

Use of the script tag