IS 4506 Interactive Clients & Servers. Overview Fat Client versus Fat Server Spectrum of Web...
-
Upload
jesse-griffin -
Category
Documents
-
view
220 -
download
3
Transcript of IS 4506 Interactive Clients & Servers. Overview Fat Client versus Fat Server Spectrum of Web...
Overview
Fat Client versus Fat Server
Spectrum of Web content formats
Active Server Pages
Active Server Page elements
Use of the script tag
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
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
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>