The Web:The Web:aan architectural viewn architectural view
•Browser
•Render HTML
•Get URL
•Send HTML
•Get HTML file
•HTTPD
FileSystem
The primitive Web modelThe primitive Web model
http
d
The primitive Web model
Inte
rnet
HTTP Get
Client
Browser
Server
File System
•Browser
•Render HTML
•Get URL with Params
•Send HTML
•Execute CGI(params)
•Build HTML on the fly
•HTTPD •CGI Process
A simple interactive Web modelA simple interactive Web model
http
d
A simple interactive Web model
Inte
rnet
HTTP Get
Cgi-bin
proc
ess
Client
Browser
Server
File System
•Browser
•Render HTML
•Get URL with Params
•Send HTML
•Execute CGI(params)
•Build HTML on the fly
•HTTPD •CGI Process •DB
•Run Sql query
•Send query results
An evolved interactive Web modelAn evolved interactive Web model
http
d
An evolved interactive Web model
Inte
rnet
HTTP Get
Cgi-bin Query SQL
proc
ess
DB
Data
Client
Browser
Server
File System
http
d
The Bottlenecks
Inte
rnet
HTTP Get
Cgi-bin Query SQL
proc
ess
DB
Data
Client
Browser SLOW!
SLOW!
Server
File System
http
d
The Bottleneck – part I
Inte
rnet
HTTP Get
Cgi-bin Query SQL
proc
ess
DB
Data
Client
Browser SLOW!
Server
File System
http
d
The solution:
Inte
rnet
HTTP Get
Cgi-bin Query SQL
proc
ess
DB
Data
Client
Smartbrowser
How? How? Including code in HTMLIncluding code in HTML
Server
File System
reduce net traffic by having a smarter client!
Programming languagesProgramming languages
• JavaJava
Enabling technologies
Client
Smartbrowser
Scripting languagesScripting languages• JavascriptJavascript• VbscriptVbscript• PerlscriptPerlscript• PythonPython• … …
Interpreted:
Source code travels
Compiled:
Executable travels
(must be
HW-OS-Browser
independent!)
http
d
The Bottleneck – part II
Inte
rnet
HTTP Get
Cgi-bin Query SQL
proc
ess
DB
Data
Client
BrowserSLOW!
Server
File System
http
d
The solution:
Inte
rnet
HTTP Get
Query SQL
Function
DB
Data
Client
Browser
Server
File System
integrate the service into the httpd process
Enabling technologies
• MultithreadingMultithreading• DLLDLL• ServletsServlets
Using…Using…
•Scripting languagesScripting languages•Programming languagesProgramming languages
Function
http
dServer
How? How? Including code in HTMLIncluding code in HTML
File System
(depending on server implementation)
mixed client- and server-side scripting
<HTML><HTML>……<SCRIPT LANGUAGE=VBScript RUNAT=SERVER><SCRIPT LANGUAGE=VBScript RUNAT=SERVER>……VBScript Commands…VBScript Commands…</SCRIPT></SCRIPT>……<%VBScript Commands%><%VBScript Commands%>……<SCRIPT LANGUAGE=JavaScript><SCRIPT LANGUAGE=JavaScript>……JavaScript Commands…JavaScript Commands…</SCRIPT></SCRIPT>……</HTML></HTML>
Code executed Code executed by the Server by the Server BEFORE the BEFORE the page is page is transferred transferred over the Netover the Net
Code transferred to the clientCode transferred to the clientand interpreted by the Browserand interpreted by the Browser
ASP SyntaxASP Syntax
The state problem
Inte
rnet
Client
1
Server
+CGI
http
d
Data User 1
Data User 2
Data User 3
Client
3
Client
2
??
A typical solution
Inte
rnet
Client
1
Server
+CGI
http
d
Data User 1
Data User 2
Data User 3
Client
3
Client
2
CookieCookie
CookieCookie
CookieCookie
Supported
by Java & JavaScript
http
d
A more radical solution
Inte
rnet
HTTP GetCgi-bin
proc
ess
Client
Browser
Server
Java
ap
plet proc
ess
Startup
Sta
rtup
Socket connection
Supported
by Java
http
d
An even more radical solution
Inte
rnet
HTTP GetCgi-bin
proc
ess
Client
Browser
Server
Java
ap
plet proc
ess
Startup
Sta
rtup
CORBAMiddle Tier
Supported
by Java
WAP - Cenni
Client Client (cellular phone)(cellular phone)MicroBrowserMicroBrowser
Gateway WAPGateway WAPRichiesta WDP + WTSL
(Wireless Datagram Protocol)Wireless Transport Security Layer
Server HTTPServer HTTPDescrizione delle pagine:
Wml (Wireless Markup Language, in XML)Hdml (HandhelD Markup Language, variante di HTML
9600 baud (*)
(*) con GPRS fino a 56 Kbit/sec, conUMTS fino a 2 Mbit/sec (Universal Mobile Telecommunication System)
More info: www.wapforum.org
XML Enabled HTTP Server
Client Client DocumentDocument
Server Server HTTPHTTPServer Server
XSLTXSLTProcessor Processor
HTTP request
StylesheetStylesheetServer Server
Get document
XML document Get SS
XSL stylesheet
XML + XSL
HTML documentHTML
document