0% found this document useful (0 votes)
90 views23 pages

IP-Chapter 1

The document discusses the goals of an Internet Programming course which are to understand the technologies underlying the World Wide Web, develop skills with common Web development tools and languages like HTML, JavaScript, and PHP, and manipulate databases with PHP. It then provides a brief history of the development of the Internet and World Wide Web, how they work using protocols like IP, TCP, and HTTP, and the continued growth and challenges of allocating IP addresses.

Uploaded by

Sølø Ëd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views23 pages

IP-Chapter 1

The document discusses the goals of an Internet Programming course which are to understand the technologies underlying the World Wide Web, develop skills with common Web development tools and languages like HTML, JavaScript, and PHP, and manipulate databases with PHP. It then provides a brief history of the development of the Internet and World Wide Web, how they work using protocols like IP, TCP, and HTTP, and the continued growth and challenges of allocating IP addresses.

Uploaded by

Sølø Ëd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Internet Programming

Course goals:
– understand the technology and protocols
underlying the World Wide Web
– become familiar with common tools and
techniques for developing Web-based applications,
both client-side and server-side
– develop a working knowledge of HTML, JavaScript,
and PHP as languages for developing Web
applications
– Manipulating MySQL Databases with PHP M.
c h ew
ala
Ch 1
Chapter 1: Overview of WWW and Internet

2
Questions

• What is the World Wide Web?


• Is it the same thing as the Internet?
• Who invented it?
• How old is it?
• How does it work?
• What kinds of things can it do?
• What does it have to do with programming?

3
Web Essentials
• Client: web browsers, used to surf the Web
• Server systems: used to supply information to these
browsers
• Computer networks: used to support the browser-
server communication

Request “document A”

document A

Client Server

4
Web = Internet
• Internet : a physical network connecting millions of computers
using the same protocols for sharing /transmitting
information (TCP/IP)
– in reality, the Internet is a network of smaller networks
• World Wide Web: a collection of interlinked multimedia
documents that are stored on the Internet and accessed using
a common protocol (HTTP)
Key distinction: Internet is hardware; Web is software
along with data, documents, and other media
Many other Internet-based applications exist
e.g., email, telnet, ftp, usenet, instant messaging
services, file-sharing services, …

5
A (Very Brief) History of the Internet
• the idea of a long-distance computer network traces back to early 60's
– Joseph Licklider at M.I.T. (a “time-sharing network of computers”, the Intergalactic
Computer Network)
– Paul Baran at RAND (tasked with designing a “survivable” communications system
that could maintain communication between end points even after damage from a
nuclear attack)
– Donald Davies at National Physics Laboratory in U.K. (developed packet switching
methodology to reduce costs associated with maintaining open transmissions)
• in particular, the US Department of Defense was interested in the development
of distributed, decentralized networks
– survivability (i.e., network still functions despite a local attack)
– fault-tolerance (i.e., network still functions despite local failure)
contrast with phone system, electrical system which are highly
centralized services
• in 1969, Advanced Research Project Agency funded the ARPANET
– connected computers at UC Los Angeles, UC Santa Barbara, Stanford Research
Institute,and University of Utah
– allowed researchers to share data, communicate
56Kb/sec communication lines (vs. 110 b/sec over phone lines)
6
Internet Growth
• throughout the 70's, the size of the ARPANET doubled every year
– first ARPANET e-mail sent in 1971
– decentralization made adding new computers easy
– TCP/IP developed in the mid 1970s for more efficient packet routing
– migration of ARPANET to TCP/IP completed 1 January, 1983
– ~1000 military & academic host computers connected by 1984
• in 80‘s, U.S. government took a larger role in Internet development
– created NSFNET for academic research in 1986
– ARPANET was retained for military & government computers
• by 90's, Internet connected virtually all colleges & universities
– businesses and individuals also connecting as computing costs fell
– ~1,000,000 computers by 1992
• in 1992, control of the Internet was transferred to a non-profit org
– Internet Society: Internet Engineering Task Force
Internet Architecture Board
Internet Assigned Number Authority
World-Wide-Web Consortium (W3C)
7
8
How does the Internet Work?
• Through communication protocols
• A communication protocol is a specification of how
communication between two computers will be
carried out
– IP (Internet Protocol): 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 Protocol)
9
The Internet Protocol (IP)
• A key element of IP is IP address, a 32-bit number
• The Internet authorities assign ranges of numbers to different
organizations
• IP is responsible for moving packet of data from node to node
• A packet contains information such as the data to be
transferred, the source and destination IP addresses, etc.
• Packets are sent through different local network through
gateways
• A checksum is created to ensure the correctness of the data;
corrupted packets are discarded
• IP-based communication is unreliable

10
The Transmission Control Protocol (TCP)
• TCP is a higher-level protocol that extends IP to
provide additional functionality: reliable
communication
• TCP adds support to detect errors or lost data and to
trigger retransmission until the data is correctly and
completely received
• Connection
• Acknowledgment

11
TCP/IP Protocol Suites

HTTP, FTP, Telnet, DNS,


SMTP, etc.

TCP, UDP

IP (IPv4, IPv6)

12
(A Very Brief) History of the Web

• the idea of hypertext (cross-linked and inter-linked documents) traces back


to Vannevar Bush in his 1945 The Atlantic Monthly article “As We May Think”
(the“memex”)
– online hypertext systems began to be developed in 1960's
e.g., Ted Nelson and Andy van Dam's Hypertext Editing System (HES), Doug
Englebert's NLS (oN-Line System)
– Aspen Movie Map (allowing virtual tour of Aspen, Colorado) was the first
hypermedia applications
– in 1987, Apple introduced HyperCard (a hypermedia system that predated the
WWW)
• in 1989, Tim Berners-Lee at the European Particle Physics Laboratory (CERN)
designed a hypertext system for linking documents over the Internet
– designed a (Non-WYSIWYG) language for specifying document content
• evolved into HyperText Markup Language (HTML)
– designed a protocol for downloading documents and interpreting the content
• evolved into HyperText Transfer Protocol (HTTP)
– implemented the first browser -- text-based, no embedded media
the Web was born!
13
History of the Web (cont.)

• the Web was an obscure, European research tool until 1993


• in 1993, Marc Andreessen and Eric Bina (at the National Center for
Supercomputing Applications, a unit of the University of Illinois)
developed Mosaic, one of the early graphical Web browsers that
popularized the WWW for the general public (Erwise was the first one,
ViolaWWW the second)
– the intuitive, clickable interface helped make hypertext accessible to the
masses
– made the integration of multimedia (images, video, sound, …) much easier
– Andreessen left NCSA to found Netscape in 1994
• cheap/free browser further popularized the Web (75% market share in 1996)
• in 1995, Microsoft came out with Internet Explorer
• Opera web browser released in 1996
• Netscape bought by AOL in 1998 for US$4.2 billion in stock
• Firefox web browser, version 1.0, released in 2004
• Google Chrome released in 2008
• today, the Web is the most visible aspect of the Internet 14
15
Web growth (cont.)
• Internet addresses are used to identify computers on the internet.
• Internet Protocol version 4 (IPv4) was first defined in 1981 and is still in
use today, but this uses a 32-bit number to specify addresses.
• IPv4 provides around 4.29 billion (i.e. 4.29 x 10 raised 9 ) addresses.
• The Internet Assigned Numbers Authority exhausted their allocated
addresses on February 3, 2011, and the Asia-Pacific Network
Information Centre (regional internet registry) exhausted theirs on April
15, 2011. Also, the Réseaux IP Européens Network Coordination Centre
(regional internet registry for Europe, the Middle East, and parts of
central Asia) exhausted their allotment on 14 September, 2012. LACNIC
(the registry for Latin America and the Caribbean) depleted its address
pool on June 10, 2014. Other registries are expected to reach
exhaustion within several years.
• IPv6 began deployment in 1999 and uses 128 bit addresses, but is also
redesigned to allow more efficient routing, network aggregation, and
ease of network reconfiguration. (And has about 3.4 x 10 raised 38
16
address.)
Basics of the WWW
• WWW is it is a Hypertext Information System
• Non-Linear structure (not a book)
• You read what you want next
• Click on Hypertext links to navigate the WWW
– Via Internet, computers can contact each other
– Public files on computers can be read by remote user
– usually HyperText Markup Language (.html)
• Markup language: defines the structure and content of hypertext
documents
– HyperText Transfer Protocol (HTTP) - a format of information
which allows one to move from one part of a document to
another or from one document to another through hyperlinks
– Uniform Resource Locator (URL): unique identifiers used to locate
a particular resource on the network( name of file on a remote
computer).
» E.g. http://www.msu.edu/~urquhar5/tour/active.html
17
Web Client: Browser
• Makes HTTP requests on behalf of the user
– Reformat the URL entered as a valid HTTP request
– Use DNS to convert server’s host name to appropriate IP
address
– Establish a TCP connection using the IP address
– Send HTTP request over the connection and wait for
server’s response
– Display the document contained in the response
• If the document is not a plain-text document but instead is
written in HTML, this involves rendering the document
(positioning text, graphics, creating table borders, using
appropriate fonts, etc.)
18
Web Servers
• Main functionalities:
– 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
19
Static vs. Dynamic pages

• most Web pages are static


– contents (text/links/images) are the same each time it is accessed
e.g., online documents, most homepages
HyperText Markup Language (HTML) is used to specify text/image format
• as the Web continues to move towards more and more online
services and e-commerce continues to grow, Web pages must
also provide dynamic content
– pages can be fluid, changeable (e.g., rotating banners)
– must be able to react to the user's actions, request and process info,
tailor services
e.g., amazon.com
• this course is about applying your programming skills to the
development of dynamic Web pages and applications

20
Internet Programming
• The three steps to develop a Web site are:
– Obtain the appropriate equipment
• Web Server – hardware and software
– Register the Web Server to an Internet Service Provider
(ISP)
• Obtain the IP address and DNS address
– Develop the contents
• Internet Programming
• Web service is a kind of client / server process
• Need interaction between client and server
• Programming for providing Web service can also be
divided into Client-side and Server-side Programming.

21
Client-Side Programming
• can download program with Web page, execute on client machine
– simple, generic, but sometimes insecure (e.g. cross-site scripting attacks)
• JavaScript
– a scripting language for Web pages, developed by Netscape in 1995
– uses a C++/Java-like syntax, so familiar to programmers, but simpler
– good for adding dynamic features to Web page, controlling forms and GUI
– requires users to have this technology enabled on their browsers
– see http://www.w3schools.com/js/
– JQuery, first released in 2006, is a library to help with cross-browser
compatibility issues and is used by more than 60% of the 10,000 most
visited websites (source: SimilarTech)
• Java applets
– can define small, special-purpose programs in Java called applets
– provides (almost) full expressive power of Java (but with more overhead)
– good for more complex tasks or data heavy tasks, such as graphics
– see http://java.sun.com/applets/
22
Server-Side Programming
• can store and execute program on Web server, link from Web page
– more complex, requires server privileges, but can still be (mostly) secure
• Common Gateway Interface (CGI) programming
– programs can be written to conform to the CGI
– when a Web page submits, data from the page is sent as input to the CGI
program
– CGI program executes on server, sends its results back to browser as a Web
page
– good if computation is large/complex or requires access to private data
• Active Server Pages (ASP), Java Servlets, PHP, Server Side Includes, Ajax
– some of these are vendor-specific alternatives to CGI (such as Microsoft’s ASP)
– provide many of the same capabilities as CGI programs but using HTML-like
tags
– some of these technologies might require functionality to be enabled in the
client’s browser
• (e.g. Ajax generally requires the use of JavaScript combined with PHP or
some other server-based programming component)
23

You might also like