Sie sind auf Seite 1von 25

| 

|

 


|

|
  

2

 !    " "


‡ Origins
± US Department of Defense (DOD) became interested
in developing large-scale computer network.
± ARPAnet (late 1960s and early 1970s)
‡ For ARPA-funded research organizations
± BITnet, CSnet (late 1970s and early 1980s)
‡ for electronic mail and file transfers
± NSFnet - 1986
‡ Originally for non-DOD funded places
‡ By 1990, it had replaced ARPAnet for non-military
uses
3

 !    " "


‡ NSFnet (continued)
± Soon became the network for all (by 1990)
± NSFnet eventually became known as the INTERNET
‡ What is Internet?
± A huge collection of computers connected in a
communications network
± TCP/IP
‡ Standard for computer network connections
‡ Allow a program on one computer to communicate with
a program on another computer via the Internet
4

 " " #  !$ #%


‡ Computers are identified by unique numeric
addresses
‡ Form: 32-bit binary number
‡ Example : 191.57.126.0 to 191.57.126.255 has 256
IP addresses
‡ Written as four 8-bit numbers, separated by periods
‡ Organizations are assigned groups of IPs for their
computers
‡ New standard, IPv6, has 128 bits (1998), WHY?
10.100.10.2 10.100.10.3

TCP
6

 "&
‡ Why domain names?
‡ Form: host-name.domain-names
‡ There maybe 2, 3 or more domain names.
‡ First domain appears to the right of the hostname, is
the domain of which the host is a part
‡ Second domain gives the domain of which the first
domain is a part
‡ Last domain specifies the type of organization in
which the host resides, largest domain in the site¶s
name
‡ Example movies.comedy.abc.com
7

 "&
‡ Examples of last domain names
± COM«EDU..NET..GOV specify ???
± Abbreviation for the country, µmy¶ for Malaysia, µse¶
for Sweden and so forth
‡ Fully qualified domain name - the host name and all
of the domain names
‡ DNS servers convert fully qualified domain names to
IPs
‡ Problem: By the mid-1980s, several different
protocols had been invented and were being used
on the Internet, all with different user interfaces
(Telnet, FTP,mailto)
1

2
9

à à "à"|$ààà%
‡ A possible solution to the proliferation of different
protocols being used on the Internet
‡ Origins
± Tim Berners-Lee at CERN proposed WWW in 1989
± Purpose: to allow scientists to have access to many
databases of scientific work through their own computers
± Document form: hypertext
‡ Units of information on WWW
± Pages? Documents? Resources?
± We¶ll call them documents
‡ Documents ± sometimes just text, usually with
embedded links to other documents, also include
images, sound, etc.
10

à à "à"|$ààà%
‡ Hypermedia ± document contains non-textual information,
example?
‡ WWW or Internet???
± The difference«..
The World Wide Web (also referred to as www or W3 or the
web) is an internet client-server distributed information and
retrieval system for world-wide hypertext linking of
multimedia documents. The web is based upon the hypertext
transfer protocol (HTTP) that transfers hypertext documents
across a varied array of computer systems.

‡ The WWW uses one of the protocols, HTTP, that runs on the
Internet, there are several others such as telnet, mailto, etc.
11

à"|| à&"
‡ Mosaic (Univ. of Illinois), in early 1993
± First to use a GUI, led to explosion of Web use
± Initially for X-Windows, under UNIX, but was
ported to other platforms by late 1993
‡ Browsers are clients that always initiate, servers
react
± Example : browser requests document from server, the
server locates the doc and then sends it to the browser
± Sometimes servers require responses..example?
‡ Most requests are for existing documents, using
HTTP but some requests are for program execution,
with the output being returned as a document
‡ Examples of current browsers«?
Mosaic Browser
14

à"|&" '"
‡ Provide responses to browser requests, either
existing documents or dynamically built documents
‡ Browser-server connection is now maintained
through more than one request-response cycle
‡ Subsequent requests for certain documents need not
be sent to the server, why??
‡ Example of web servers??
15

 (
‡ URL stands for Uniform Resource Locator
‡ General form -> scheme:object-address
± The scheme is often a communications protocol, such as
telnet or ftp
± For the http protocol, the object-address is fully qualified
domain name/doc path
‡ Host name may include a port number, as in
anusuriya:80 (80 is the default) Port Number
‡ URLs cannot include spaces or any of a collection of
other special characters (semicolons, colons, ...), so
how to include a space or one of disallowed special
characters in a URL????
16

 (
‡ Example URL of a specified document
( http://www.tooot.com/education/resume.html
‡ How will be the above URL if the specified document is a
directory rather than single document..?
‡ What is the default file name searched by the server?
‡ Server also can be configured to search for files with other
names (we will learn about this during lab session ƒ)
‡ URL vs URI vs URN , give an example, any idea?

URL http://www.gleaners.org/faq.html
URN www.gleaners.org/faq.html#Q04
URI http://www.gleaners.org/faq.html#Q04
17

 "
‡ MIME stands for Multipurpose Internet Mail
Extensions (MIME)
‡ Originally developed for email
‡ Used to specify to the browser the form of a file
returned by the server (attached by the server to
the beginning of the document)
‡ Form: type/subtype
± Examples: text/plain, text/html, image/gif, image/jpeg
‡ Server gets type from the requested file name¶s suffix
± *.html implies text/html
‡ Browser gets the type explicitly from the server
18

 "
‡ Experimental types
± Subtype begins with x-, example, video/x-msvideo
± Experimental subtypes are added to MIME specification
stored in user¶s Web server.

‡ Experimental types require the server to send a


helper application or plug-in so the browser can deal
with the file
19

 )* + *,-(*#*../.


‡ The protocol used by ALL WWW communications
Request Phase Form
R 
 R  

R  

 

 
‡ An example of the first line of a request:
î /cs.utem.edu.my/degrees.html/1.1
‡ Most commonly used request methods:
± GET - Fetch a document
± POST - Execute the document, using the data in body
± HEAD - Fetch just the header of the document
± PUT - Store a new document on the server
± DELETE - Remove a document from the server
20

 )* + *,-(*#*../.


‡ Four categories of header fields:
1. General ± For general information, such as date
2. Request ± Included in request headers
3. Response ± For response headers
4. Entity - Used in both request and response headers
‡ Common request fields:
± Accept: text/plain
± Accept: text/*
‡ If-Modified_since: date
± Specifies that the requested file should be sent only if it has been
modified since the given date
‡ Common response fields:
± Content-length: 488
± Content-type: text/html
21

 )* + *,-(*#*../.


‡ An example of HTTP request header
î /articles/news/today.asp/1.1
Accept:/
Accept-Language:en-us
Connection:eep-Alive
ost:localhost
Referer:http://localhost/links.asp
User-Agent:ozilla/4.0compatible;
 . ; indows
 .0)
Accept- ncoding:gzip,deflate
‡ The header of a request must be followed by a blank line,
which is used to separate the header from the body of the
request.
22

 )* + *,-(*#*../.


Response Phase Form
Status line
Response header fields
blank line
Response body

‡ Status line format:


HTTP version status code explanation
Example: R 
‡ Status code is a three-digit number; first digit
specifies the general status
± 1 => Informational
± 2 => Success
± 3 => Redirection
± 4 => Client error
± 5 => Server error
± Status code 404 is for?????
23

 )* + *,-(*#*../.


‡ The header field, Content-type, is required
‡ An example of a complete response header:

/1.100
ate:on,un001::4î
erver:Apache/1.3.Unix)Red-at/Linux)
Last-modified: ed,un0018:1:î
Accept-ranges:bytes
Content-length:
Connection:close
Content-type:text/html

<L>
<B>
....
24

&! # 0&
‡ Client-side scripting
± Validates user input
± Accesses the browser
± Enhances Web pages with ActiveX® controls, applets, etc.
± Manipulates browser documents
‡ Client-side validation
± Reduces number of requests that need to be passed to server
‡ Client-side scripting limitations
± Browser dependency
± Viewable to users through View Source command
‡ Example of Client-side scripting ± JavaScript, VBScripts
25

&! # 0&
‡ Server-side scripts
± Provides programmers greater flexibility
± Generates custom responses for clients
± Contains greater programmatic capabilities than
client-side equivalents
± Has access to server-side software that extend
server functionality
± Example of server-side scripting ± ASP, PHP,
JSP, CGI/Perl

Das könnte Ihnen auch gefallen