active server pages v.s. java server pages

12
Active Server Pages v.s. Java Server Pages Presenters: Lan Guo Qunying Fan Pei- Xun Wu Date: 02-11-2000

Upload: carter-boyd

Post on 01-Jan-2016

54 views

Category:

Documents


4 download

DESCRIPTION

Active Server Pages v.s. Java Server Pages. Presenters: Lan Guo Qunying Fan Pei-Xun Wu Date: 02-11-2000. What is Active Server Pages(ASP)?. Developed by Microsoft Server-side Script Executed in Web Server Response to user request. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Active Server Pages  v.s.  Java Server Pages

Active Server Pages v.s.

Java Server Pages

Presenters: Lan Guo Qunying Fan

Pei-Xun Wu

Date: 02-11-2000

Page 2: Active Server Pages  v.s.  Java Server Pages

What is Active Server Pages(ASP)?

• Developed by Microsoft

• Server-side Script

• Executed in Web Server

• Response to user request

Page 3: Active Server Pages  v.s.  Java Server Pages

Which web server can run ASP?

• Windows Platform:

- Internet Information Server (IIS 3.0 ~ 5.0) for NT/2000

- Personal Web Server for Win98

• Non-Windows Platform:

- Chilisoft ASP product for Unix variants

Page 4: Active Server Pages  v.s.  Java Server Pages

Structure of ASP(1/2)

• HTML Document• Server-side Script

• Using <% %> Script element

- ex. <% ……%> • Using <SCRIPT> element

- ex. <SCRIPT RUNAT=“SERVER”> - - </SCRIPT>• Support two (or more) Script Language

• VBScript (default)• JScript• switch by using <%@ LANGUAGE = Jscript %>

Page 5: Active Server Pages  v.s.  Java Server Pages

Structure of ASP (2/2)

• Server-side Include

- Including separate files by

<! -- #INCLUDE FILE=“filename” -- >

or

<SCRIPT RUNAT=“SERVER” SRC=“filename”>

<./SCRIPT>

Page 6: Active Server Pages  v.s.  Java Server Pages

Processing an ASP File

• ASP pages are .asp files

• Locate server-side code

• Compile server-side code by proper scripting engines

• Insert result to appropriate points into the page

• Send the page to IIS

Page 7: Active Server Pages  v.s.  Java Server Pages

Web ServerISAPI

ASP DLL

ASPScript

ScriptingEngines

Database

ASP with Web Server

Internet Serer Application Programming Interface

Page 8: Active Server Pages  v.s.  Java Server Pages

The Intrinsic ASP Objects (1/3)

• Response Object

- used to access the response created to send back to client

• Application Object

- created when ASP DLL is loaded

- provide a repository for storing variables and object reference

- available for all pages

Page 9: Active Server Pages  v.s.  Java Server Pages

The Intrinsic ASP Objects (2/3)

•Session Object

- created for each visitor when they first request ASP page

- remain available till default time out

- store variables and object references

- available only to the pages that this visitor opens

• Server Object

- provide method and properties used in scripting with ASP

• ASPError Object

- provide detail information about the last error occured

Page 10: Active Server Pages  v.s.  Java Server Pages

The Intrinsic ASP Objects (2/2)

SessionObject

Application Object

Request

Response

SessionObject

Request

Response

ServerObject

ASPErrorObject

Client

Client

Server

Page 11: Active Server Pages  v.s.  Java Server Pages

0

20

40

60

80

100

120

In-Process Out-of-Process In-Proc OOP In-Proc OOP

NT 4 Service Pack 5 NT 4 sp5, VBScript 5 Windows 2000 Beta 3

ASP Performance

Uniprocessor

2P

4P

ASP Performance Graphs

Page 12: Active Server Pages  v.s.  Java Server Pages

ASP Conclusion

• Completely embedded with HTML, Script

• No manually Compiling

• Object Oriented and can expand function of ActiveX

Server Component

• Browser Compliant

• Code hiding

• Easily coding

• Efficiency