Beruflich Dokumente
Kultur Dokumente
Languages
CSC1720 Introduction to Internet
Essential Materials
Outline
Web or Internet?
Internet Terminology
Client
Any computer on the network that requests
services from another computer on the network.
Server
Any computer that receives requests from client
computers, processes and sends the output.
Web Page
Any page that is hosted on the Internet.
Web Development
The process of creating, modifying web pages.
Netscape, Mosaic
Opera
Lynx
Text
mode
browser
, fast!
Some Statistics
Until July 02
Win98/ME
WinNT
MAC
39%
51%
2%
3%
1%
64% , Win 95
4%
5% , Win2000 20%
1% , www.thecounter.com
Internet Explorer
Version 1.0
Version 2.0
Version 3.0
Version 4.0
- August 1995
- November 1995
- August 1996
- October 1997
Version 5.0
Version 5.5
Version 6.0
- March 1999
- July 2000
- August 2001
Netscape Navigator
Netscape 1.0
Netscape 2.0
Netscape 3.0
Netscape 4.0
- December 1994
- March 1996
- August 1996
Mozilla
Netscape 5.0
Netscape 6.0
Netscape 6.1
Netscape 6.2
Netscape 7.0
- Skipped
- November 2000
- August 2001
- November 2001
Web Server
Web connection
Apache vs. MS
6:3
Which server is
running?
Examine
www.cuhk.edu.h
k
from netcraft
The HTTP
Request/Response
Model
Request
Client
Response
HTML Codes
<html>
</html>
Server
Program /
Scripts
Valid HTTP
Request/Response
mesgs
Provides additional information
GET /index.html HTTP/1.0
HTTP/1.0 200 OK
Host: www.anyhost.com
</html>
HTTP
HTTP
DEMO!
Example
Request/Response
Top-Level Domains
Country code
domain
Generic
domain
IP Address Space
W3C
Web Programming
Languages
Currently
XML
SGML
simplifies
XML
defines
Language
HTML
Usage of the
Language
Web pages
XHTML
Meta
XML
Definitions Data
XML
Data
Documents
HTML
Element
Attribute Name
Attribute Value
WML
XML
Name
CDF
CML
ETDML
FlowM
L
Description
ITML
Information Technology ML
MathM
L
Mathematical ML
VXML
Voice XML
XHTML
Extensible HTML
XML Transformation
Same XML Document
HTML
StyleSheet 1 (XSL)
WML
XSL
Transformation
XML Document
StyleSheet 2 (XSL)
XML Example
Reference:
HK Weather F
orecast
MathML Example
E = mc2
MathML Presentation Markup Example
<mrow>
<mi>E</mi><mo>=</mo><mi>m</mi>
<msup>
<mi>c</mi>
<mn>2</mn>
</msup>
</mrow>
XHTML
XHTML Basic
(Dec 19, 2000)
Modularization
of XHTML
XML
XHTML 1.0
(Jan 26, 2000)
XHTML 1.1
(May 31, 2001)
Others
Others
Using Stylesheets to
add presentation
HTML Page
Web browser
CSS stylesheet
Displayed page
CSS Example
CSS Example:
Skin an Input Form?
Client-side code
ECMAScript
VBScript Microsoft
Embedded in <script> elements and execute in the
browser, provides immediate feedback to the user.
Reduces the load on a server, reduces network traffic.
Server-side code
Execute on the server
CGI/Perl, ASP, PHP, ColdFusion, JSP
The code remains hidden from users, and browser
independent.
Server-Side
HTML, XML
Cascading Style Sheets (CSS)
Scripting languages
- JavaScript, VBScript
Java Applets
ActiveX controls
Plug-ins and Helpers
application
CGI/Perl
PHP
ColdFusion
Scripting Languages
- Server-side JavaScript
- ASP, JSP, Java Servlets
ISAPI/NSAPI programs
JavaScript
DHTML
Positioning
Style modifications
Event handing
DHTML Examples
VRML
VRML Example
Reference:
MolScript
Break Time 10
minutes
CGI / Perl
CGI / Perl
Using Scripts
Database
scripts
File stored
HTML Page
Web browser
CSS stylesheet
Displayed page
VBScript
ASP
Hands request to
ASP
Server
Component
Client
Reply with
HTML page
Server
Translates
Script
Into
HTML
PHP
PHP Popularity
http://php.weblogs.com/popularity
ColdFusion
CF Page
Request *.cfm
Cold Fusion
Application
Server
Client
Web Server
Web Page
ColdFusion Example
*.cfm
Java 2, Standard
Edition
Source:
java.sun.com
Java 2 Platforms
Java Servlets
Servlets Advantages
Integration
Take advantages of all the Java technologies,
JDBC, Enterprise JavaBeans (EJB).
Efficiency
A single process that runs until the servletbased application is shut down.
Servlet Example
What is JSP?
Client
Response
Server
Execute
helloServlet.class
Processing phase
A simple example
Java Servlet & JSP
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
<HTML>res)
public void doGet(HttpServletRequest req, HttpServletResponse
throws ServletException, IOException {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
<HEAD>
<TITLE>Hello</TITLE>
</HEAD>
<BODY>
<H1>
out.println("<HEAD><TITLE>Hello World</TITLE></HEAD>");
<%
if (request.getParameter("name") == null)
out.println("<BODY>");
{
out.println("<BIG>Hello World</BIG>");
out.println("Hello World");
out.println("</BODY></HTML>");
} else {
}
out.println("Hello, " + request.getParameter("name"));
}
}
%>
</H1>
</BODY>
</HTML>
out.println("<HTML>");
Template Pages
Server Page Template
Resulting HTML
<html>
<html>
<title>
<title>
A simple example
A simple example
</title>
translation
</title>
<body color=#FFFFFF>
<body color=#FFFFFF>
</body>
</body>
</html>
</html>
JSP Technology
Web Server
Platforms
Microsoft Windows
Most popular
platforms
Reusable
components
No
Security
against System
crashes
No
Yes
Scripting
VBScript, Jscript
Java
JSP
is platform and server independent.
Language
<html>
<head><title>Hello World by JSP</title></head>
<body>
<font size=12>
<%
out.println("Hello INE2720 Students and the World!");
%>
</font>
</body>
Web Services
Critical Elements of a
Basic Web Services
Architecture
Format
Servic
es
Networ
k
XML (Format)
UDDI (Publish)
A directory
service
WSDL (Find)
A protocol for
applications to
find a service
The Internet
The Internet, using TCP/IP protocols
SOAP (Bind)
A protocol that
enables
applications to
agree the
communication
Service-Oriented
Architecture
Find - UDDI
Requestor
Registry
Bind
WSDL, SOAP
Publish - UDDI
Provider
References
The End.
Thank you for your patience!