Chapter One
Chapter One
The Fundamentals
Overview of the internet
Internet is network of networks (i.e. when two or more devices are connected for sharing
data or resources or exchange messages we call it networks)
The Internet is a collection of computers connected by network cables or through satellite
links.
Internet is a physical collection of routers and circuits as a set of shared resources.
Internet is a networking infrastructure that provides services to distributed applications.
Most of these computing devices are traditional desktop PCs, Unix-based workstations,
and so called servers that store and transmit information such as Web (WWW) pages and
e-mail messages.
Increasingly, non-traditional computing devices such as Web TVs, mobile computers,
pagers, and toasters are being connected to the Internet.
In the Internet jargon, all of these devices are called hosts or end systems.
End systems, as well as most other ‘pieces’ of the Internet, run protocols that control the
sending and receiving of information within the Internet.
TCP (Transmission Control Protocol) and IP (Internet Protocol) are two of the most
important protocols in the Internet.
End systems are connected together by communication links.
No company owns the internet (I.e.no central administration or control for the internet), it
is cooperative effort governed by a system of standard and rules.
Internet Service Providers (ISP) provides the Internet connectivity. These corporations
dedicate computers to act as servers - that is they make information (such as Web pages
or e-mail) available to users of the Internet.
Origin of the internet
In the 1969, departments of defense (DOD of USA) started a network called ARPANET
(Advanced Research Projects Administration Network) with one computer at California and
three at Utah.
2. Presents an interface to the user A database from which a client requests information
3. Gathers information from the Responsible for data storage and management
user, submits it to a server
4. Client relies on the services of Server authorizes the client's requests.
server.
5. The configuration of client The configuration of the server is more complex and
systems is simple. sophisticated.
6. The efficiency of client is limited. The performance of server is high, and they are
highly efficient.
7. The client systems can be switch Switching off servers may be disastrous for client
off without any fear. systems that continuously request the services.
8. There can be single user logins. Server support multiple user login and request
processing simultaneously.
9. Examples of clients are Examples of servers are web servers, file servers,
smartphones, desktops, laptops, database servers, etc.
etc.
Table 1: Clients vs Server
There are different web browsers that are available and in use today and they all come with a
variety of features. Some of the :-
NCSA Mosaic :- The first real HTML browser (1993)
Microsoft Internet Explorer :- Most commonly found browsers
Opera:-The fastest browser on Earth
Lynx:-Text based web client
Netscape, Safari, Google Chrome etc.
HTTPS protocol is an extension of HTTP. The “S” in the abbreviation comes from the word Secure
and it is powered by Transport Layer Security (TLS) [the successor to Secure Sockets Layer
(SSL)], the standard security technology that establishes an encrypted connection between a web
server and a browser. Without HTTPS, any data you enter into the site (such as your
username/password, credit card or bank details, any other form submission data, etc.) will be sent
as a plaintext and therefore susceptible to interception or eavesdropping. For this reason, you
should always check that a site is using HTTPS before you enter any information.
Evolution of HTTP
HTTP functions as a request–response protocol in the client–server computing model. The Internet
Engineering Task Force (IETF) develops HTTP standards. HTTP has four versions: HTTP/0.9,
HTTP/1.0, HTTP/1.1, and HTTP/2.0.
10 | P r e p a r e d b y : F i r o m s a K .
1. HTTP/0.9: The One-line Protocol
Initial version of HTTP: a simple client-server, request-response, telnet-friendly protocol
Request nature: single-line (method + path for requested document)
Methods supported: GET only
Response type: hypertext only
Connection nature: terminated immediately after the response
No HTTP headers (cannot transfer other content type files), No status/error codes, No URLs,
No versioning
2. HTTP/1.0: Building extensibility
Browser-friendly protocol
Provided header fields including rich metadata about both request and response (HTTP
version number, status code, content type)
Response: not limited to hypertext (Content-Type header provided ability to transmit files
other than plain HTML files — e.g. scripts, stylesheets, and media)
Methods supported: GET , HEAD , POST
Connection nature: terminated immediately after the response
3. HTTP/1.1: The standardized protocol
This is the HTTP version currently in common use.
Introduced critical performance optimizations and feature enhancements
Methods supported: GET , HEAD , POST , PUT , DELETE , TRACE , OPTIONS
Connection nature: long-lived
Generally, HTTP protocols include ways to-
HTTP Methods
Two commonly used methods for a request-response between a client and server are: GET and
POST.
11 | P r e p a r e d b y : F i r o m s a K .
GET - Requests data from a specified resource.
POST - Submits data to be processed to a specified resource.
– Note that query strings (name/value pairs) is sent in the URL of a GET request:
/test/demo_form.asp?name1=value1&name2=value2
GET requests
– can be cached
– remain in the browser history
– can be bookmarked
– should never be used when dealing with sensitive data
– have length restrictions
– should be used only to retrieve data
– Note that query strings (name/value pairs) is sent in the HTTP message body of a
POST request:
– POST /test/demo_form.asp HTTP/1.1
Host: w3schools.com
POST requests:
PUT: a request for the server to store the data in the request and the new contents
on the specified URI.
DELETE: a request for the server to delete the resource named in the URI.
12 | P r e p a r e d b y : F i r o m s a K .
OPTIONS: a request for the information about the request methods the server
supports.
TRACK: a request for the web server to echo the HTTP request and its headers.
CONNECT:-Converts the request connection to a transparent TCP/IP channel
Layer protocol
13 | P r e p a r e d b y : F i r o m s a K .
1. Application layer protocols- provide accurate and efficient data delivery. Typical protocols
in application layer:
o FTP (File Transfer Protocol) - for file transfer
o Telnet (Teletype Network) - provides remote login service. It allows a user on one
machine to log into another machine on the network.
o SMTP (Simple Mail Transfer Protocol) - for mail transfer
o HTTP (Hypertext Transfer Protocol) - for communication between web browsers and
web servers
o LPD (Line Printer Daemon) - designed for printer sharing
2. Transport Layer protocols - define the rules of dividing a large piece of data into segments
and reassemble segments into the original piece. Typical protocols in transport layer are:
o TCP (Transmission Control Protocol) - Provide further functions such as reordering and
data resend. Takes large blocks of information from an application and breaks them into
segments. It numbers and sequences each segment so that the destination’s TCP protocol
can put the segments back into the order the application intended. After these segments
are sent, TCP (on the transmitting host) waits for an acknowledgment of the receiving
end’s TCP virtual circuit session, retransmitting those that aren’t acknowledged. Before
a transmitting, host starts to send segments down the model, the sender’s TCP protocol
contacts the destination’s TCP protocol to establish a connection. What is created is
known as a virtual circuit. This type of communication is called connection-oriented.
o UDP (User datagram protocol) - does not provide functions such as reordering and data
resend. UDP does not sequence the segments and does not care in which order the
segments arrive at the destination. But after that, UDP sends the segments off and
forgets about them. It does not follow through, check up on them, or even allow for an
acknowledgment of safe arrival—complete abandonment. Because of this, it is referred
to as an unreliable protocol. This does not mean that UDP is ineffective, only that it
doesn’t handle issues of reliability. Further, UDP doesn’t create a virtual circuit, nor
does it contact the destination before delivering information to it. Because of this, it’s
also considered a connectionless protocol. Generally, TCP for reliability and UDP for
faster transfer.
14 | P r e p a r e d b y : F i r o m s a K .
TCP UDP
Sequenced There is no sequencing
Reliable Unreliable
Connection oriented Connectionless
Virtual circuit Low overhead
3. Internet layer protocols - define the rules of how to find the routes for a packet to the
destination. It only gives best effort delivery. Packets can be delayed, corrupted, lost,
duplicated, out-of-order. Typical protocols in internet layer are:
o IP (Internet Protocol)- Provide packet delivery
o ARP (Address Resolution Protocol) - Define the procedures of network address /
MAC address translation
o ICMP (Internet Control Message Protocol) - Define the procedures of error
message transfer
4. Network Interface layer - Formats IP datagrams at the Network layer into packets that
specific network technologies can understand and transmit. Responsible for sending and
receiving TCP/IP packets on the network medium (physical/Data Link)
1. Server-Side validation- The form information is sent to the server and validated. If the
validation fails, the response is sent back to the client, the page containing the form is
15 | P r e p a r e d b y : F i r o m s a K .
refreshed and feedback shown. After correcting errors, the user resends the form to the
server for validation.
Users must fill all the information and submit it to the server before they get
feedback.
Server response may delay feedback as the information is being validated.
1. Client side validation: The form information is validated on the browser. If validation
fails, feedback is shown on the webpage containing the form. After correcting errors, the
browser validates the form again. The information gets sent to the server once validation
is successful.
16 | P r e p a r e d b y : F i r o m s a K .
Benefits of using client side validation
Unsecure validation. It is easy to turn off browser scripts and bypass the
validation.
Not valuable when access to the server is needed to validate user's input. For
example: checking if a username is already in use requires access to the server.
Cannot provide feedback that persists on the page if the user navigates away.
Website evaluation
There are different criteria used for evaluating the website for its acceptance. The followings are
some of them.
Strategy- Good website design is backed by strategy. Even the most attractive,
user-friendly website is not successful when it is not achieving what your company
needs.
Usability- Usability is all about the practical considerations of what goes into good
website design, such as speed, user-friendliness, security, technical details like
sitemaps, etc.
Style- Beauty may be relative, but that does not mean there are not clear aesthetic
principles to guide your website design. The best designs will align with their
brands, create positive impressions for visitors, be clean, and complement the
content they are communicating.
17 | P r e p a r e d b y : F i r o m s a K .
Content- The two main considerations regarding content are readability and
usefulness. Readability is important because if the visitors cannot make out the
content, whether that is because it is too small or in a pale color or in an unreadable
font, there is no way for message to get across. Usefulness is just as important,
however, because if the content does not matter to the reader, there may be the
chance to lose him or her anyway.
Search Optimization- there are many ways that the design of your website impacts
search optimization
18 | P r e p a r e d b y : F i r o m s a K .