Chapter 1- Lecture 1
Chapter 1- Lecture 1
Other Technologies:
Cascading Style Sheets (CSS)
scripting languages such as JavaScript and PHP to make
it efficient and user friendly.
1.1 Internet vs. Web
The Internet:
The InterNet is short for INTERconnected NETwork.
Network of networks with common address space, common name space
and common communication protocols.
provides the means to pass packets of data around the globe.
An inter-connected computer networks, linked by wires, cables, wireless
connections, etc.
Web:
a collection of interconnected documents and other resources.
make finding and exchanging documents across the Internet easier.
The world wide web (WWW) is accessible via the Internet, as are
many other services including email, file sharing, etc.
1.1 How does the Internet Work?
(Continue)
Through communication protocols
Protocol: a set of rules governing the format of data sent
a specification of how communication between two computers will be
carried out
The Internet is a packet-switched network.
Use TCP/IP
In 1973 Vint Cerf and Bob Kahn created the TCP/IP
communication protocols
IP (Internet Protocol: responsible for making sure the packets are sent
to the right destination.
defines the packets that carry blocks of data from one node to another
TCP (Transmission Control Protocol) and UDP (User Datagram
Protocol): the protocols by which one host sends data to another.
Other application protocols: DNS (Domain Name Service), SMTP
(Simple Mail Transmission Protocol), and FTP (File Transmission
1.1 Internet Protocol (IP)
IP: A simple protocol for sending data between two
computers.
IP defines how to address and route each packet to make sure
it reaches the right destination.
It is responsible for making sure the packets are sent to the
right destination.
Each gateway computer on the network checks this IP address
to determine where to forward the message. each device has
a 32-bit IP address written as four 8-bit numbers (0-255)
Connection
Acknowledgment
TCP/IP Protocol Suites
TCP, UDP
IP (IPv4, IPv6)
1.1 A Brief Intro to the Internet
Origins
ARPAnet - late 1960s and early 1970s
Network reliability
For ARPA-funded research organizations
NSFnet - 1986
Originally for non-DOD funded places
Initially connected five supercomputer centers
By 1990, it had replaced ARPAnet for non-
military uses
Soon became the network for all (by the early 1990s)
NSFnet eventually became known as the Internet
1.1 Brief Intro to the Internet (continued)
Internet Protocol (IP) Addresses
Every node has a unique numeric address
Form: 32-bit binary number
New standard, IPv6, has 128 bits (1998)
Organizations are assigned groups of IPs for their computers
Domain names
Form: host-name.domain-names
First domain is the smallest; last is the largest
Last domain specifies the type of organization
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, Usenet,
mailto)
1.2 The World-Wide Web
A possible solution to the proliferation of different protocols being used on
the Internet
Origins
Tim Berners-Lee at CERN proposed the Web in 1989
Purpose: to allow scientists to have access to many databases of scientific
work through their own computers
Document form: hypertext
Pages? Documents? Resources?
We’ll call them documents
Web or Internet?
The Web uses one of the protocols, http, that runs on the Internet--there
are several others protocols (telnet, mailto, etc.)
The World Wide Web
(WWW)
WWW is a system of interlinked, hypertext
documents that runs over the Internet
Two types of software:
Client:a system that wishes to access the
information provided by servers must run client
software (e.g., web browser)
Server: an internet-connected computer that
wishes to provide information to others must run
server software
Client and server applications communicate over
the Internet by following a protocol built on top of
TCP/IP – HyperText Transport Protocol (HTTP)
Basics of the WWW
WWW: a hypertext system that operates over the Internet
The core functionality of the Web is based on three standards:
But some requests are for program execution, with the output being
returned as a document
1.4 Web Servers
Provide responses to browser requests, either existing
documents or dynamically built documents
Virtual hosts
1.4 Web Servers - (continued)
Web servers now support other Internet protocols
Currently, the two most common server configurations are
Apache running on Linux and Microsoft’s IIS running on
Windows.
Apache
(open source, fast, reliable)
Began as the NCSA server, httpd
Maintained by editing its configuration file
IIS
Maintained through a program with a GUI interface
1.4 Web Servers -
Main functionalities:
(continued)
Server waits for connect requests
When a connection request is received, the server
creates a new process to handle this connection
The new process establishes the TCP connection and
waits for HTTP requests
The new process invokes software that maps the
requested URL to a resource on the server
If the resource is a file, creates an HTTP response that
contains the file in the body of the response message
If the resource is a program, runs the program, and
returns the output
1.5 Uniform Resource Locators
General form:
scheme:object-address
The scheme is often a communications protocol, such as telnet, http,
ftp, gopher, telnet, file, mailto, and news
For the http protocol, the object-address is:
fully qualified domain name/doc path
For the file protocol, only the doc path is needed
Host name may include a port number, as in
zeppo:80 (80 is the default)
URLs cannot include spaces or any of a collection of other special characters
(semicolons, colons, ...)
The doc path may be abbreviated as a partial path
The rest is furnished by the server configuration
If the doc path ends with a slash, it means it is a directory
1.5 Uniform Resource Locators
General form:
scheme:object-address
When you enter the above URL into the browser, it would:
ask the DNS server for the IP address of www..ucc.edu.gh
connect to that IP address at port 80
ask the server to GET /info/regesstepp/index.html
display the resulting page on the screen
1.6 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)
Type specifications
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
Experimental types
Subtype begins with x-
e.g., video/x-msvideo
Experimental types require the server to send a helper application or
1.7 The HyperText Transfer Protocol (continued)
Four categories of header fields:
General, request, response, and entity
Common request fields:
Accept: text/plain
Accept: text/*
If-Modified_since: date
JavaScript
- A client-side HTML-embedded scripting language
- Only related to Java through syntax
- Dynamically typed and not object-oriented
- Provides a way to access elements of HTML documents and
dynamically change them
1.9 The Web Programmer’s Toolbox
(continued)
Flash
- A system for building and displaying text, graphics, sound,
interactivity, and animation (movies)
- Two parts:
1. Authoring environment
2. Player
- PHP
- A server-side scripting language
- Similar to JavaScript
- Great for form processing and database access
through the Web
1.9 The Web Programmer’s Toolbox
(continued)
Ajax
- Asynchronous JavaScript + XML
- No new technologies or languages
- Much faster for Web applications that have
extensive user/server interactions
- Uses asynchronous requests to the server
- Requests and receives small parts of documents, resulting in
much faster responses
- Ruby