Introduction to internet
programming
Chapter One
The Fundamentals
The fundamentals
Today’s lesson:
–Internet history, Uses and Services
• The World Wide Web(WWW)
• Client-Server Architectural Overview of
WWW
• Browser and Web Server
• Uniform Resource Locators(URLs)
• Domain Name System(DNS
Internet history, Uses and Services
The history of internet dates back to the Cold
War days of late 1950s.
It evolved when the US Defense Force
Began to investigate a method for
geographically dispersing their centralized
computers
It was believed that reducing reliance on one
single route for transmission of data and
using decentralized system, would provide
safer option for controlling their missiles.
Internet history, Uses and Services
A ‘fear’ that in the event of a Nuclear war, an enemy
may destroy a link in the US chain of communication,
was the precursor to the technology of revolution.
Today, the internet is the an international forum for
exchange of information and ideas between millions
of people world wide.
The Department of Defense DoD (USA) began an
initiative which later contributed towards the physical
network of the Four computers(Nodes) right across
America in 1969.
Internet history, Uses and Services
This project was named Advanced Research project Agency
(ARPA).
ARPAnet was the response to the launching of the first
artificial satellite Sputnik by the USSR in 1957.
The world wide web and the use of Hypertext, again dates
back to the early 1990s.
Dr. Tim Berners-Lee working at laboratory for practice
physics in Geneva, Switzerland, simply link to other
computers invented the web- a method of sharing information
and idea
Internet history, Uses and Services
The name of world wide web originated b/c of the hyperlinks
to and from these computers where imagined to be like a
spider’s web.
Dr. Tim Berners-Lee invertor of HTML, Graduate of Oxford
University.
in 1989 he invented the World Wide Web, an internet-
based hypermedia initiative for global information
sharing.
Marc Andreesen invented the first GUI browser.
What is Internet?
• It is the largest network in the world that connects
hundreds of thousands of individual networks all over
the world.
• The popular term for the Internet is the “information
highway”.
• Rather than moving through geographical space, it
moves your ideas and information through cyberspace
– the space of electronic movement of ideas and
information.
Internet….
• No one owns it
• It has no formal management organization.
• As it was originally developed by the Department of
defense, this lack of centralization made it less
vulnerable to wartime or terrorist attacks.
• To access the Internet, an existing network need to pay
a small registration fee and agree to certain standards
based on the TCP/IP (Transmission Control
Protocol/Internet Protocol) .
The uses of the Internet
• Send e-mail messages.
• Send (upload) or receive (down load)
files between computers.
• Participate in discussion groups, such as
mailing lists and newsgroups.
• Surfing the web.
• etc
What is World wide web?
• In short called The Web, is the a network of computers
all over the world.
• The Web (World Wide Web) consists of information
organized into Web pages containing text and graphic
images.
• It contains hypertext links, or highlighted keywords
and images that lead to related information.
• A collection of linked Web pages that has a common
theme or focus is called a Web site.
• The main page that all of the pages on a particular Web
site are organized around and link back to is called the
site’s home page.
World wide web
• All computers in the web can communicate with each
other.
• All the computers use communication standards called
HTTP
• How WWW work?
• Web information is stored in a documents called web
pages
• Web pages are files stored on computers called web
servers
• Computers reading the web pages are called web
clients
• Web clients view pages with a program called a web
browser
World wide web
• A Web browser is the software that you run on your
computer to make it work as a web client
• Popular web browsers are:
internet explorer.
Netscape Navigator,
Mozilla Firefox.
Opera,
safari…
• Web browser fetches a web page from a server by a
request
• A request is a standard HTTP request containing a page
address
• E.g, http://www.gsb.com/page.html
World wide web
How does the browser display the pages?
•All web pages contains instruction for
display
•The browser display the page by reading the
instructions.
•The most common display instructions are
called HTML tags
•Eg. <p> this is a paragraph…</p>
How to access the Internet?
• Many schools and businesses have direct
access to the Internet using special high-
speed communication lines and equipment.
• Students and employees can access through
the organization’s local area networks
(LAN) or through their own personal
computers.
• Another way to access the Internet is
through Internet Service Provider (ISP).
How to access the Internet?
• To access the Internet, an existing network need to pay
a small registration fee and agree to certain standards
based on the TCP/IP (Transmission Control
Protocol/Internet Protocol) reference model.
• Each organization pays for its own networks and its
own telephone bills, but those costs usually exist
independent of the internet.
• The regional Internet companies route and forward all
traffic, and the cost is still only that of a local telephone
call.
Internet Service Provider (ISP)
• A commercial organization with permanent
connection to the Internet that sells temporary
connections to subscribers.
• Examples:
America Online, Microsoft network, AT&T
Networks.
How to access the Web?
• Once you have your Internet connection, then
you need special software called a browser to
access the Web.
• Web browsers are used to connect you to
remote computers, open and transfer files,
display text and images.
• Web browsers are specialized programs.
• Examples of Web browser: Netscape Navigator
(Navigator) and Internet Explorer.
Client/Server Structure of the Web
• Web is a collection of files that reside on
computers, called Web servers, that are located
all over the world and are connected to each
other through the Internet.
• When you use your Internet connection to
become part of the Web, your computer
becomes a Web client in a worldwide
client/server network.
• A Web browser is the software that you run on
your computer to make it work as a web client.
Hypertext Markup Language (HTML)
• The public files on the web servers are ordinary
text files, much like the files used by word-
processing software.
• To allow Web browser software to read them,
the text must be formatted according to a
generally accepted standard.
• The standard used on the web is Hypertext
markup language (HTML).
Hypertext Markup Language (HTML)
• HTML uses codes, or tags, to tell the Web browser
software how to display the text contained in the
document.
• For example, a Web browser reading the following
line of text:
<B> A Review of the Book<I>Wind
Instruments of the 18th Century</I></B>
• Recognizes the <B> and </B> tags as instructions to
display the entire line of text in bold and the <I> and
</I> tags as instructions to display the text enclosed
by those tags in italics.
What is DNS(Domain Name System)?
• DNS is the method by which internet addresses
in mnemonic form such as sun.scis.mwu.com
are converted into the equivalent numeric IP
address such as 134.220.4.1
• To the user and application process this
translation is a service provided either by the
local or from a remote host via Internet.
Addresses on the Web: IP Addressing
• Each computer on the internet does have a
unique identification number, called an IP
(Internet Protocol) address.
• The IP addressing system currently in use on the
Internet uses a four-part number.
• Each part of the address is a number ranging
from 0 to 255, and each part is separated from
the previous part by period,
• For example, 106.29.242.17
IP Addressing
• The combination of the four IP address parts
provides 4.2 billion possible addresses (256 x
256 x 256 x 256).
• Members of various Internet task forces are
working to develop an alternate addressing
system that will accommodate the projected
growth.
• However, all of their working solutions require
extensive hardware and software changes
throughout the Internet.
Domain Name Addressing
• Most web browsers do not use the IP address to locate
Web sites and individual pages.
• They use domain name addressing.
• A domain name is a unique name associated with a
specific IP address by a program that runs on an
Internet host computer.
• This program, which coordinates the IP addresses and
domain names for all computers attached to it, is called
DNS (Domain Name System ) software.
• The host computer that runs this software is called a
domain name server.
Domain Name Addressing
• Domain names can include any number of parts separated by
periods, however most domain names currently in use have only
three or four parts.
• Domain names follow hierarchical model that you can follow
from top to bottom if you read the name from the right to the
left.
• For example, the domain name gsb.uchicago.edu is the
computer connected to the Internet at the Graduate School of
Business (gsb), which is an academic unit of the University of
Chicago (uchicago), which is an educational institution (edu).
• No other computer on the Internet has the same domain name.
Uniform Resource Locators
• What is URL?
• It is the exact address or location of the files or web pages be
retrieved on the internet
• URL syntax
<protocol>://<host><port>/
<path><query>
Two types of URI: URL, URN
• URL:Uniform Resource Locator
– Refers to an existing protocol
• http: ftp, gopher, news:
– Points to a document on a specific server
– Takes you straight to the resource and data
Uniform Resource Locators
• URN: Uniform Resource Name
– Is only a unique name you can use to identify any
resource you want.
– Related name to namespace
– Globally unique, persistent identifier
• Independent of location
Both URL and URN can uniquely identify resources
over the web.
Use URL when you need to know or specify location
information
Use URN if resource is location-independent
Address-specific(URL) and name-based(URN)
Uniform Resource Locators
• URI:
– Uniform Resource Identifier
– Collection of URL’s and URN’s
Uniform Resource Locators
• The IP address and the domain name each identify a
particular computer on the Internet.
• However, they do not indicate where a Web page’s HTML
document resides on that computer.
• To identify a Web pages exact location, Web browsers rely
on Uniform Resource Locator (URL).
• URL is a four-part addressing scheme that tells the Web
browser:
1. What transfer protocol to use for transporting the file
2. The domain name of the computer on which the file resides
3. The pathname of the folder or directory on the computer on
which the file resides
4. The name of the file
Structure of a Uniform Resource Locators
protocol pathname
http://www.chicagosymphony.org/civicconcerts/index.htm
Domain name filename
http => Hypertext Transfer Protocol
HTTP
• The transfer protocol is the set of rules that the
computers use to move files from one
computer to another on the Internet.
• The most common transfer protocol used on the
Internet is the Hypertext Transfer Protocol
(HTTP).
• Two other protocols that you can use on the
Internet are the File Transfer Protocol (FTP) and
the Telnet Protocol
How to find information on the Web?
• A number of search tools have been developed and
available to you on certain Web sites that provide
search services to help you find information.
• Examples:
Yahoo www.yahoo.com
Google www.google.com
Lycos www.lycos.com
AltaVista www/alta-vista.com
How to find information on the Web?
• You can find information by two basic means.
• Search by Topic and Search by keywords.
• Some search services offer both methods, others only
one.
• Yahoo offers both.
Search by Topic
You can navigate through topic lists
Search by keywords
You can navigate by entering a keyword or phase
into a search text box.
TCP/ IP Protocols
Lesson Two
General description of the TCP/IP protocols
TCP/IP services
Components of TCP/IP:IP,UDP, ICMP
Overview of HTTP Protocol
What is HTTP?
HTTP Methods
HTTP Messages
HTTP Request Model
General description of the TCP/IP protocols
• All communication, over a network, is
governed by predetermined rules called
protocols
• Transmission Control Protocol (TCP):
is the set of rules that specifies how these messages should
be formatted, ordered, compressed, and error checked.
• Establishes connections among sending and
receiving Web computers
• Handles assembly of packets at point of
transmission, and reassembly at receiving end
TCP/IP services
• Transmission Control Protocol (TCP) is the transport
protocol that manages the individual conversations
between web servers and web clients.
• TCP divides the HTTP messages into smaller pieces,
called segments, to be sent to the destination client.
• It is also responsible for controlling the size and rate at
which messages are exchanged between the server and
the client.
• TCP is a connection-oriented protocol
TCP/IP services
• IP is responsible for taking the formatted
segments from TCP, encapsulating them into
packets, assigning the appropriate addresses, and
selecting the best path to the destination host.
Components of TCP/IP: IP,UDP, ICMP
User Datagram Protocol (UDP)
• The pieces of communication in UDP are called
datagrams.
• These datagrams are sent as "best effort" by this
Transport layer protocol.
• UDP is a simple, connectionless protocol
• UDP is a simple protocol that provides the basic
Transport layer functions.
Components of TCP/IP: IP,UDP, ICMP
• The two most common Transport layer protocols of
TCP/IP protocol suite are Transmission Control
Protocol (TCP) and User Datagram Protocol (UDP).
Internet Protocol (IP):
• Provides the Internet’s addressing scheme
• All hosts on a network have a logical ID called IP
address
Components of TCP/IP: IP,UDP, ICMP
Internet control message protocol [ICMP]
• Works at a network layer and used for many different
services.
• Is a management protocol and messaging service
provider for IP.
• Its massages are carried as IP datagrams.
• ICMP packets have the ff x-tics:
Can provide hosts with information about network
problems
Encapsulated within IP datagrams
E.g. Destination unreachable: if a router can’t send IP datagram
any further, it uses ICMP to send a message back to the sender.
Overview of HTTP Protocol
• HTTP is a common protocol that governs the way that a
web server and a web client interact.
• HTTP defines the content and formatting of the requests
and responses exchanged between the client and server.
• Both the client and the web server software implement
HTTP as part of the application.
• The HTTP protocol relies on other protocols to govern
how the messages are transported between client and
server
• HTTP messages consists of request from client to server
and response from server to client.
• Request and response messages use the generic message
format for transferring entities.
Overview of HTTP Protocol
• HTTP request headers
Additional information about the request
May include information about the client(sender)
itself
Like accept, host…
HTTP response headers
May be information about the server or the
resources
Like location(URI), proxy, server….
Stateless nature of HTTP
• A fundamental characteristics of the web is the
stateless nature interaction b/n browsers and
servers
• HTTP is a stateless protocol
• Each HTTP request a browser sends to a web is
INDEPENDENT of any other request.
• Stateless nature of HTTP allows users to browse
by following hypertext links and visiting the
pages in any order.
HTTP request methods
• GET- retrieve information from the resource
server
• POST- the information back to the resource
server
• Delete- information from the resource server
• PUT- the information at the resource location
Chapter Two
• Web Design and Development
Gathering requirements
Information organization and architecture
Information Visualization
Web Design and Development
• Gathering all the necessary requirements
• Functional and non functional requirements
• Typical user may not read the entire content of
your web pages
• A visitor may spend a few seconds scanning it
before they decide whether to leave or to stay.
*if you want a visitor to read your text, be sure to
make you point in very first sentence of the
page
Web Design and Development
• Try to keep them occupied with short
paragraphs
• Try to keep all sentences, paragraphs, characters
as short as possible => less is more
• Use a lot of space b/n your paragraphs and
characters
• Don’t place too much contents on a single page,
if you have a lot try to break your information
into smaller chunks
Web Design and
Development ..
• Create a navigation structure common for all pages
• Keep hyperlinks inside your text paragraphs to a
minimum
• Download speed not more than 7 seconds OR below <
7 seconds , unless visitors will leave a web page.
• If your page takes long time to download , remove
some of your multimedia content.
• Let your audience speak- feedback from the users is a
very good thing,
Web Design and Development …
• Be consistent in the use of background, text and link
colors, background images, footer information etc.
• If you are consistent in your overall design people will
enjoy and familiarity in your site.
• Check your pages on a variety of browsers and
platforms to see they will look good
Web Design and Development …
Site Guidelines; web site should:
Provide original contents as many forms as possible
Provide valuable, timely information to the user, not
lots of data; web sites should be updated regularly
Share everything you learn
Be easy to read; make your pages as easy to read as
possible
Be interactive; good interactivity engages the user and
makes your site memorable.
Web Design and Development …
Site Guidelines; web site should:
Be well-organized
Have a secure and automated server
etc
Web Design and Development …
Generally, designing web site needs careful
thinking and a lot of planning
The most important thing is to know your
audience
What makes a good web site?
Know your audience- what will they use your page
for?
Content- is it content they want?
Timely, current and relevant
Accurate and trustworthy
Appropriate links
Design for Readability
Design for Attractiveness
Design for Easy understanding
What makes a good web site?..
Design for Efficiency
Design to Meet your goals
General web page design considerations
Visual appeal: pleasing, uncluttered layout
Functionality: how quickly the page loads
Home page: 1-2 screens
Page size
Parameters affecting layout: screen resolution,
browser, use of non-standard HTML
Use ‘width’, ‘height’, and ‘alt’ attributes for images
Check all links and images in all pages
Spelling, syntax, capitalization, punctuation etc.
2 !
t e r
p
• .
ha
t c
ou
a b
a l l
i s
hi s
T