0% found this document useful (0 votes)
59 views12 pages

Web Programming: Origins of Internet and Web

The document discusses the origins and development of the internet and world wide web. It provides details on: 1) How the internet started as a research project between universities and government agencies, and expanded through networks like ARPANET, NSFNET, and TCP/IP protocols. 2) Key components of web programming including IP addresses, domain name servers (DNS), clients/browsers, servers, hypertext markup language (HTML), and uniform resource locators (URLs). 3) How the world wide web was created by Tim Berners Lee in 1989 to allow for non-sequential access to hyperlinked documents across the internet using browsers and HTML pages.

Uploaded by

Rahul Garje
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views12 pages

Web Programming: Origins of Internet and Web

The document discusses the origins and development of the internet and world wide web. It provides details on: 1) How the internet started as a research project between universities and government agencies, and expanded through networks like ARPANET, NSFNET, and TCP/IP protocols. 2) Key components of web programming including IP addresses, domain name servers (DNS), clients/browsers, servers, hypertext markup language (HTML), and uniform resource locators (URLs). 3) How the world wide web was created by Tim Berners Lee in 1989 to allow for non-sequential access to hyperlinked documents across the internet using browsers and HTML pages.

Uploaded by

Rahul Garje
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

WEB PROGRAMMING

Origins of Internet and Web:

Internet started as a research project to experiment with connecting computers together with packet
switched networks. It was developed with funding and leadership of the DoD (Department of Defense ,
US) by Advanced Research Projects Agency (ARPA). First node established in 1969. This ARPAnet was
used for small text based email transfers. But it was available only for labs and universities.

Later came BITnet and CSnet for file and email transfer in late 70’s , still were not able to be identified as
National networks.

A new National network was constructed by National Science Foundation(NSFNet). Soon it was available
for many institutions and research labs and by 1990 NSFnet replaced ARPAnet, connecting more than
one million computers around the world by 1992. In 1995, a small part of NSFnet returned to be
research network and the rest developed as Internet.

Internet is a huge collection of computers and other devices connected in a communicative network. It
is a network of networks. These computers communicate using the low level protocol-TCP/IP,
Transmission Control Protocol/Internet Protocol.

IP Address:

A protocol is a set rules to govern the communication of data between computers in a network. All the
computers attached to a network must be identified. This is done by a number called Internet Protocol
address (IP address). It is a unique 32 bit address number, divided into 4 parts of 8 bits each. There are
various classes of networks depending on the IP addresses. Eg: 192.168.2.56

A Host is a computer in the network whose function is to provide services to the network users.

Domain Name Server (DNS):

Domain is a part of the computer network where the data processing resources are under common
control. The resources may be processors, storage, I/O devices, files, data, programs etc. The name of
the last system in a network is called Domain name. There is a unique IP address for each domain name.
Users type the domain names on the browsers , they may not know the corresponding IP address. This
conversion of the domain name to the corresponding IP address is done by Domain Name server.
Domain names will begin with the name of the host machine, followed by the larger enclosing collection
of machines.

Hostname.firstdomain.seconddomain…..last domain

Eg: vtu.sit.mca.org here vtu is the host, sit is first domain name, org is the last demain which
identifies the type of organization in which the host resides.

Some popular domain names are: com, edu, org, mil, in, au etc.

Dept of MCA, SIT, Valachil, Mangalore. Page 1


The host name along with all the domain names are called a Fully Qualified Domain Name.

This fully qualified domain name given by the user on their browser must be converted into an IP
address before the message is transmitted to the destination on the Internet. These conversions
(mapping) are done by software systems called Domain Name Servers. All document requests from
browsers are routed to the nearest DNS, if it cannot, to the next DNS.

World Widw Web:

Originally constructed by a small group of people led by Tim Berners Lee at CERN, in 1989. He proposed
a new protocol for the Internet and a system of document access to use it and named as WWW. This
system allowed document search and retrieval from any part of the Internet. In 1991 this was released
to the world.

The documents were having Hypertext as the content- text having links to other documents allowing
non-sequential access of the content. Then units of information on the web can be referred to as pages,
documents or resources. A document can contain text, images, sound and video, together called
Hypermedia. Web and Internet are not same.

So, Web is a vast collection of data , information, software and protocols , spread across the world in
web servers , which are accessed by client machines by browsers through the Internet. The components
of the web are as follows:

Structural Components Semantic Components

Clients/browsers Hyper Text Transfer Protocol (HTTP)

Servers – run on sophisticated hardware Hyper Text Markup Language (HTML)

Caches eXtensible Markup Language (XML)

Internet – the global infrastructure which Uniform Resource Identifiers (URIs)


facilitates data transfer

• Clients use browser application to send URIs via HTTP to servers requesting a Web page

• Web pages constructed using HTML (or other markup language) and consist of text, graphics,
sounds plus embedded files

• Servers (or caches) respond with requested Web page

• Client’s browser renders Web page returned by server

– Page is written using Hyper Text Markup Language (HTML)

– Displaying text, graphics and sound in browser

• The entire system runs over standard networking protocols (TCP/IP, DNS,…)

Dept of MCA, SIT, Valachil, Mangalore. Page 2


Other Protocols

• ftp – file transfer


• smtp – simple mail transport
• Usenet – user network discussion boards
• telnet – telecommunication network
• Gopher – "go for" document retrieval
• snmp – simple network management

Web Browsers:

A browser is (a software) a client on the web which initiates the communication with the
server. The request from the browser (client) is served by the server. Examples are Internet
Explorer, Mozilla FireFox, Netscape Navigator, Safari etc.

Web servers return content to clients

 content: a sequence of bytes with an associated MIME (Multipurpose Internet Mail


Extensions) type. The type of the document content is give by this MIME. Accordingly
the browser will display the content using appropriate programs.

Example MIME types

 text/html HTML document

 text/plain Unformatted text

 application/postscript Postcript document

 image/gif Binary image encoded in GIF format

 image/jpeg Binary image encoded in JPEG format

The content returned in HTTP responses can be either static or dynamic.

 Static content: content stored in files and retrieved in response to an HTTP request

 Examples: HTML files, images, audio clips.

 Dynamic content: content produced on-the-fly in response to an HTTP request

 Example: content produced by a program executed by the server on behalf of


the client.

All Web content is associated with a file that is managed by the server.

Most common web servers are: Apache, IIS, SunOne etc.

Dept of MCA, SIT, Valachil, Mangalore. Page 3


Apache is basically for Unix systems but now used for variety of platforms

For windows, Microsoft has developed Internet Information Server(IIS).

Web server operation:

All the communication between the web client and a web server use the std protocol http.

 Web server informs its operating system to accept incoming network connections using a
specific port on the machine.
 The server also runs as a bachground process.
 A client (browser) opens a connection to the server, sends a request, receives information from
server and closes the connection.
 Web server mainly monitors a communications port on its host machine, accept the http
commands through it and performs specified operations.
 http commands include a URL specifying the host machine.
 The URL received is translated into either a filename or a program name, accordingly the
requeated file or the output of the program execution is sent back to the browser.
Server characteristics:

File structure of a web server has two separate directories.

1) Document root:- file hierarchy growing from this has the web documents which are served to the
clients.
2) Server root:- stores the server and support software.
Clients have NO DIRECT ACCESS to the document root through their URLs. The server maps the
requested URLs to the document root.

Latest servers provide more than one site on them thus reducing the cost maintenance. These
secondary hosts are called virtual hosts. Servers interact with databases using Common Gateway
Interface (CGI).

Apache : derived from a patchy version of earlier server httpd and is the most widely used one. It is an
open source software , fast and reliable. Based on UNIX but suitable for other platforms too.

IIS: By Microsoft, Designed to deliver high speed and

secure information publishing.Serves as a platform for developers to extend internet standard


communication capabilities, Runs as a part of Windows.

URL(Uniform Resource Locator):

Uniquely identify resources on the Internet


Format is scheme:object-address
Ex: http://www.cs.srinivas.org/index.html
file://C|/docs/www/root
Here, HTTP object-address is in two parts

Dept of MCA, SIT, Valachil, Mangalore. Page 4


//Fully qualified domain name as in www.cs.srinivas.org and
/Path to document as in /index.html
Each scheme has unique object-address characteristics.
The file:// protocol is used for documents within the client machine, here the fully qualified
domain names are omitted.
Eg: file://c:/mca/sem4.html
URL Paths:

The path of the document for a http protocol is same as that for a document or file or a directory in a
client. In Unix the path components are separated by forward slashes (/) and in windows backward
slashes (\).

But an URL need not include all the directories in the path. A path which includes all the directories is a
complete path, else it is a partial path.

More about HTTP:

Web uses many protocols, HTTP (Hyper Text transfer Protocol) being the most important which
is a very simple request/response protocol

Latest version is HTTP 1.1

It has two parts, request phase and response phase. Both have two parts: a header-contains info about
the communication and a body-contains the actual data.

General format of a HTTP request is as follows:

1) HTTP method Domain/path version


2) Header fields
3) Blank line to separate the header & body
4) Message body
The common http commands (request codes)are :

• GET – retrieve document specified by • POST – give information (eg.


URL annotation) to the server

• PUT – store specified document under • DELETE – remove document specified


given URL by URL

• HEAD – retrieve info. about document • TRACE – loopback request message


specified by URL
• CONNECT – for use by caches
• OPTIONS – retrieve information about
available options

Dept of MCA, SIT, Valachil, Mangalore. Page 5


Similarly there are HTTP Response Codes as:

• 1xx – Informational – request received, • 4xx – Client Error – bad syntax or cannot
processing be fulfilled

• 2xx – Success – action received, • 5xx – Server Error – server failed


understood, accepted

• 3xx – Redirection – further action


necessary

Header Fields:

Format of a header field is :- field name : value of field

4 categories of header fields are:

General: general info like any data

Request: included in request headers

Response: for response headers

Entity: used in both request and response headers

Accept field is the most common request field which specifies the browser preference for MIME type of
the requested file. (host, user-agent being others)

Eg: accept: text/plain

accept: image/gif

accept: text/* here MIME can be anything

General format of a HTTP response is as follows:

1. Status line-3 digit status code included in http version and a short W
explanation of the code
Eg: http/1.1 200 ok. Meaning of status code is : c
First digit
1
Category
Informational
(bro
2 Success
3 Redirection
4 Client error
5 Server error
2. Response header fields- has many lines of info about the response.
• Date: Mon, 31 Dec 2007 • Server: Apache/2.0.46 (Red Hat)
03:29:50 • Last-Modified: Sun, 09 Jan 2005
• GMT • 03:00:18 GMT

Dept of MCA, SIT, Valachil, Mangalore. Page 6


• ETag: "3a0004-153-a6d29480" • Connection: close
• Accept-Ranges: bytes • Content-Type: text/html;
• Content-Length: 339

3. Blank line
4. Response body <HTML><Head>……etc
Security:

Encryption: process of converting data into unknown format to prevent from unauthorized usage.

Decryption: converting back to the original form.

Before 1976, an encryption key had to be secretly communicated between parties. Diffie and
Hellman invented public key encryption system that uses two-part keys .The public key is freely
shared with the world Each person keeps their own private part of the key.
Public Key Encryption
 A wants to send a message to B
 A uses B's public key to encrypt the
message.
 The message is sent over public channels.
 Only B can decrypt it with his private key

Web programmer’s tool box:

XHTML, XML, JavaScript, Java,

Perl, CGI, PHP, Ruby, Rails and AJAX. ( Collect Information about these topics)

--------------------------------------------------------------------------------------------

HTML
HTML is a language for describing web pages.
 HTML stands for Hyper Text Markup Language
 HTML is not a programming language, it is a markup language
 A markup language is a set of markup tags
 HTML uses markup tags to describe web pages

 HTML is the authoring language used to create documents on the World Wide Web.
 HTML is used to define the structure and layout of a Web page, how a page looks and any
special functions.
 HTML does this by using what are called tags that have attributes.
 For example <p> means a paragraph break. Tim Berners-Lee & HTML
 Tim Berners-Lee was the primary author of html, assisted by his colleagues at CERN, an
international scientific organization based in Geneva, Switzerland. Tim Berners-Lee is currently
the Director of the World Wide Web Consortium, the group that sets technical standards for
the Web.

HTML Tags

Dept of MCA, SIT, Valachil, Mangalore. Page 7


HTML markup tags are usually called HTML tags
 HTML tags are keywords surrounded by angle brackets like <html>
 HTML tags normally come in pairs like <b> and </b>
 The first tag in a pair is the start tag, the second tag is the end tag
 Start and end tags are also called opening tags and closing tags

HTML Documents ( Web Pages)

 HTML documents describe web pages


 HTML documents contain HTML tags and plain text
 HTML documents are also called web pages
The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents
and display them as web pages. The browser does not display the HTML tags, but uses the tags
to interpret the content of the page:

<html>
<body>
This is the visible page content
<h1>My First Heading</h1>

<p>My first paragraph</p>

</body>
</html>

Creating and Editing HTML documents:

Any plain text editor is used (like Notepad) to create and edit HTML. Save the page with
.html as the extension. However, professional web developers often prefer HTML editors
like FrontPage, PageMill or Dreamweaver, instead of writing plain text. The file is then
opened using any we browser like Microsoft Internet Explorer, Netscape Navigator, Mozilla
FireFox etc.

HTML documents are defined by HTML elements.


HTML Elements
An HTML element is everything from the start tag to the end tag:

Start tag * Element content End tag *


<p> This is a paragraph </p>
<a href="default.htm" > This is a link </a>
<br />    

Dept of MCA, SIT, Valachil, Mangalore. Page 8


* The start tag is often called the opening tag. The end tag is often called the closing tag.
HTML Element Syntax
 An HTML element starts with a start tag / opening tag
 An HTML element ends with an end tag / closing tag
 The element content is everything between the start and the end tag
 Some HTML elements have empty content
 Empty elements are closed in the start tag
 Most HTML elements can have attributes

 HTML elements without content are called empty elements. Empty elements can be
closed in the start tag.
 <br> is an empty element without a closing tag (it defines a line break).
 In XHTML, XML, and future versions of HTML, all elements must be closed.
 Adding a slash to the start tag, like <br />, is the proper way of closing empty elements,
accepted by HTML, XHTML and XML.
 HTML tags are not case sensitive

HTML Attributes
Attributes provide additional information about HTML elements.
 HTML elements can have attributes
 Attributes provide additional information about the element
 Attributes are always specified in the start tag
 Attributes come in name/value pairs like: name="value"
(description of various tags and their attributes with examples is to be noted)

XHTML
 XHTML is a stricter and cleaner version of HTML.

 Before you continue you should have a basic understanding of HTML and the basics of
building web pages

 XHTML stands for EXtensible HyperText Markup Language

 XHTML is almost identical to HTML 4.01

 XHTML is HTML defined as an XML application

 XHTML is a W3C Recommendation (Jan 26 2000)

 XHTML is compatible with HTML 4.01. All browsers support XHTML.

 XHTML is a combination of HTML and XML (EXtensible Markup Language).

Dept of MCA, SIT, Valachil, Mangalore. Page 9


 XHTML consists of all the elements in HTML 4.01, combined with the strict syntax of
XML.

 Many pages on the internet contain "bad" HTML.

 XML is a markup language where everything must be marked up correctly, which results
in "well-formed" documents.

 XML is designed to describe data, and HTML is designed to display data.

 Therefore - by combining the strengths of HTML and XML, W3C recommended a


markup language that is useful now and in the future - XHTML.

Important differences:

 XHTML elements must be properly nested

 XHTML elements must always be closed

 XHTML elements must be in lowercase

 XHTML documents must have one root element

Mandatory XHTML Elements:

 All XHTML documents must have a DOCTYPE declaration. The html, head, title, and
body elements must be present.

 This is an XHTML document with a minimum of required tags:

 <!DOCTYPE Doctype goes here>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title goes here</title>
</head>
<body>
</body>
</html>

 The xmlns attribute in <html>, specifies the xml namespace for a document, and is
required in XHTML documents. However, the HTML validator at w3.org does not
complain when the xmlns attribute is missing.

 This is because the namespace "xmlns=http://www.w3.org/1999/xhtml" is default, and


will be added to the <html> tag even if you do not include it.

SGML and DTDs:

 SGML stands for “Standard Generalized Markup Language”

Dept of MCA, SIT, Valachil, Mangalore. Page 10


 HTML, XHTML, XML and many other markup languages are defined in SGML

 A DTD, or “Document Type Definition” describes the syntax to use for the current
document

 There are three different DTDs for XHTML--you can pick the one you want

 These DTDs are public and on the web

 You must start your XHTML document with a reference to one of these DTDs

 Every XHTML document must begin with one of the DOCTYPE declarations (DTDs):

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

 The three main DTDs are as follows:

 Strict

 Use for really clean markup, with no display information (no font, color, or
size information)

 Use with CSS (Cascading Style Sheets) if you want to define how the
document should look

 Transitional

 Use with standard HTML and/or with CSS

 Allows deprecated HTML elements

 Frameset

 Use if your document uses HTML frames

An XHTML Example:

 <!DOCTYPE html PUBLIC


"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
strict.dtd">
<html>

Dept of MCA, SIT, Valachil, Mangalore. Page 11


<head>
<title>A simple document</title>
</head>
<body>
<p>A simple paragraph.</p>
</body>
</html>

------------------------------------------------------------------------------------------------------

Dept of MCA, SIT, Valachil, Mangalore. Page 12

You might also like