0% found this document useful (0 votes)
34 views

Internet Programming - Chapter One

It's about internet programming and it's introduction

Uploaded by

redwanibrahim19
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Internet Programming - Chapter One

It's about internet programming and it's introduction

Uploaded by

redwanibrahim19
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 69

Chapter one

Overview of the internet and wide


web
Contents
Internet Technologies and Protocols
• Overview of the Internet
• World Wide Web
• Client-server architecture
• How the Web works?
• Hypertext Transfer Protocol (HTTP 1.0/HTTP 1.1/secure
HTTP)
• Other Web protocols (FTP, SMTP, ...)
• Web content validation
• Website evaluation(readability, layout, coloring, trust…)
What Is the Internet?
• A network of networks, joining government
and private computers together and providing
an infrastructure to use E-mail, to transfer
file ,to download and upload hypertext
documents, etc
• Arpanet-advanced research project agency US
department of defense force.(1969)
Historical back ground of Internet
• On the fourth October in 1957, The Soviet Union
successfully launched the first satellite.
• it shocked the world—especially the United
States of America, who had their own
programme to launch satellite .
• This event lead directly to the creation of the US
Department of Defence Advanced Research
Projects Agency(ARPA).
History back ground of Internet…
• In 1960, psychologist and computer scientist
Joseph Licklider published a paper entitled Man-
Computer Symbiosis, which articulated the idea
of networked computers providing advanced
information storage and retrieval.
• in 1967 this computer network planned as
ARPANET.
• in December 1969 the first four-computer
network (internet or ARPANET )was up and
running.
History back ground of Internet…
• The core problem in creating a network was
how to connect separate physical networks.
– The technique that solve this problem known as
packet switching.
• this principle is still used to run the Internet
today.
How Internet Works
• The Internet enable transmits data from one
computer to another
• If the receiving computer and the sending
computer is on same network, it can send the
message directly
• If the sending computer and receiving computer is
not on the same network , the sending computer
send the message to another computer that can
send the message to the receiving computer
8
Figure 1: Routing Messages
over the Internet

Principles of Information Systems, Seventh Edition 9


Internet Services
• The Internet provides a wide range of services, some
of them are:
– E-Mail
• You can Send and receive email messages.
– To login to remote computer to access file using telnet
protocol
– File transfer
• You can down load and upload file using FTP (File Transfer
Protocol)
– for example you can download software using FTP (File Transfer Protocol).
– You can upload web site to server.
– Web navigation
• You can navigate World Wide Web.
– Chat room
• a facility that enables two or more people to engage in
interactive “conversations” over the Internet
– videoconferencing services
– E-business
• the use of the Internet and digital technology to
execute all the business processes or any type of
business activity in the enterprise.
– Etc
World Wide Web.
• Also known as WWW, W3, W cubed, or just
"The Web".
• A collection of interlinked(one document link
to another document) multimedia documents
that are stored on web server and accessed
using a protocol called HTTP.
• it is the resources available on the Internet.
historical back ground of World Wide Web

• It is invented in 1991 by Tim Berners-Lee, while


he was consulting at CERN (
European Organization for Nuclear Research) in
Switzerland.
• The original purpose of the World Wide Web
(WWW) was to provide easy access to cross-
referenced documents that existed on the CERN
computer network

13
Retrieving documents on the Web
• Every file on the Internet has a unique
URL( UNIFORM RESOURCE LOCATOR).
– The URL of a given document is the address of that
document which is stored on a SERVER.
• Web browsers use the URL to retrieve the file
from the server.
– Because of this relationship between clients and
servers, the Web is a CLIENT-SERVER type of
network.
Retrieving documents on the Web..
• URLs are translated into numeric addresses using the
DOMAIN NAME SYSTEM (DNS).
– For example, www.microsoft.com is translated to
207.46.192.254
– This numeric address is called the IP ADDRESS.
• Once the translation is made by the DNS, the
browser can contact the Web server and ask for a
specific file.
• The web server respond
• The web browser display
URL
• A document on the Web is called a Web page
• A Web page is identified by a unique address
called the Uniform Resource Locator (URL)
– Just like every body has an address, each Web
page has an address describing where it can be
found and these addresses are called URL.
• Each URL has several parts for example
http://www.google.com/services/index.html
• http://
– This is the protocol used to access the web.
• www.
– This indicates that the Web page you are looking
is part of the World Wide Web.
• google
– This part of the address is called the domain name.
– This is a unique address used for identifying a Web server on the
Internet
– The address of web server can also be Internet Protocol address.
– but It is difficult to remember every website’s IP address we
frequently use .
• In order to make the web useable, each web server assigned DNS
associated with IP address.
– For example
IP address DNS
• 69.147.114.224 yahoo.com
• 209.85.299.99 google.com
• 69.63.181.19 facebook.com
• Etc
• .com
– it identifies the type of institution or organization like, .edu, .org
– gives an idea of where the document is stored
• /
– Anything after this symbol is the path of the document .
• services
– The Directory
• index.htm
– A word with ".htm" or "html" is the name of the specific page in
the Web site.
– .html also indicates that the computer language used to format
documents is HTML.
Note :
URL’s with the symbol ~ is the address indicates a
personal homepage and does not guarantee for
accuracy.
http://www.msu.edu/~urquhar5/tour/
active.html

http:// /~urquhar5/tour/
identifies the protocol
Used to transfer the file active.html
File Location on Remote Computer

www.msu.edu
Domain Name -
name of remote computer
Protocols of the Web

• a protocol is rules and conventions to be followed when


there is a communication between network devices.
• This rules and conventions includes:
– Rules and conventions to identify and make connections
with devices
– Rules and conventions that specify how data is
packaged ,sent and received.
• There are two levels of protocols:
– lower level protocols
– higher level protocols
• lower level protocols
– networking protocols that govern how two or more
computer systems communicate with one another.
– For example TCP and UDP.
• higher level protocols
– protocols that determines how applications exchange
information and perform certain tasks. For example HTTP
, FTP, etc
– These higher level application protocols then use the
lower level networking protocols such as TCP to
communicate over the Internet.
HTTP
– Stands for Hyper Text Transfer Protocol
– it is invented by Tim Berners-Le
– protocol used for communication between web
browsers and web servers.
– Originally designed for hypertext or text but it is
used to transfer all types of media(text, hypertext,
audio, video, and so on)
• It is stateless protocol :
– This means once a client sends a request, a server
responds, server discard any information related
to the request or the server remembers noting
about the request.
– It establishes a new TCP connection for each
request/response transaction.
– The protocol provides no means of storing a user's
data between requests.
• HTTP Version
– HTTP/1.0
• HTTP/1.0 evolved from the original ``0.9'' version of HTTP
• In HTTP/0.9 and 1.0, the connection is closed after a single
request/response pair.
• In HTTP 1.0 open a new connection for each request/response pair.
And after each response the connection is closed.

– HTTP/1.1
– HTTP/1.1 evolved from HTTP 1.0
– HTTP 1.1 is the latest version of Hypertext Transfer Protocol (HTTP)
– HTTP 1.1 also allows you to have persistent connections which means that you
can have more than one request/response on the same HTTP connection.
HTTP method
• GET (default) and POST do basically the same thing: Send data
from the client to the server. However, they have some
differences:
• GET
– Appends form data directly to the end of the URL
– Data transferred through GET is visible to users as a result it is not
suitable for sending confidential data for example passwords
– Data and the entire URL transferred through GET method is Limited
to 2,048 characters .
• POST
– Data is included in the body of the request.
– This method Send data invisible to users
– Data transferred through POST method has no limit in the size of
character.
26
HTTP messages
• http has two types of HTTP messages:
• Request,
• Response
• A request message consists of three parts :
1.The request line
2. header section
3.The message body
1.The request line

• When client sends a message to the server The


first part of the message is the request line,
containing:
– A method (HTTP command) such as GET or POST
– A document address, and
– An HTTP version number
• Example:
– GET /index.html HTTP/1.0
– the above request line says "give me index.html
resource
2. header section
• The second part of a request is header information,
• It specifies the client's configuration and the client's preferred document format
in the form Name: Value. such as:
– What the client software is
– What formats it can accept
– etc
• Example:
– Identifies the client program
• User-Agent: Mozilla/2.02Gold (WinNT; I)
– formats it can accept
• Accept: image/gif, image/jpeg, */*
– Accept-Language: en, fr, de
• Accept-language Shows the language the client can accept For example:
English, French, German
– etc
• A blank line ends the header
3.The body of the message

• The third part of a request (after the blank


line) is the body of the message, which
contains data
– This is used by POST method
– This part is empty for GET method
• The response message also consists of three parts:
1. the status line.
2. header section
3.The body of the message
the status line
• status line has three parts separated by spaces:
– The HTTP version
– A status code
– A short description of what the status code means
• For example
– HTTP/1.0 200 OK
– HTTP/1.0 404 Not Found
The following are some more status code

Code short meaning


description
200 OK The request succeeded, and the resulting resource
(e.g. file or script output) is returned in the message
body
301 Moved the document is moved
permanently
400 Bad request There is a syntax error in the request.
403 Forbidden client is not allowed to access (e.g., protected)
404 Not found The document is not found.
500 Internal server There is an error at the server site, such as server
error crash.
503 Service server is overloaded
unavailable
2. header section

• header section describe the content of the response found on


the body section. In particular:
– The Content-Type:
• Describe the type of the data in the body, such as text/html or
image/gif.
– for example Content-Type: text/html
– The Content-Length:
• Describe Content-Length in bytes.
– for example Content-Length: 1354
– etc
3.The message body

• The message body contains the content of


the response
<html>
<body>
<h1>Happy New Millennium!</h1>
</body>
</html>
Request message
Request line
Headers
1
A blank line
Body
Response message
Status line
Headers
2
A blank line
Body

36
Sample HTTP Exchange
• To retrieve the file at the URL
http://www.somehost.com/path/file.html
– send the following :
GET /path/file.html HTTP/1.0
User-Agent: HTTPTool/1.0
[blank line here]
– The server may respond the following:
HTTP/1.0 200 OK
Date: Fri, 31 Dec 1999 23:59:59 GMT
Content-Type: text/html
Content-Length: 1354
<html> <body> <h1>Happy New Millennium!</h1> (more
file contents) . . . </body> </html>
Simple Mail Transport Protocol ( SMTP)
• A protocol enable to used to send and receive e-
mail.
File Transfer Protocol(FTP)
• A protocol used transfers files between an FTP
server and a given computer.
• for example, to download software.
Voice over Internet Protocol(VoIP)
• A protocol enable to accomplish voice
communication over the internet. for
example, phone calls.
Web Programming Languages
• Java

• JavaScript

• VBScript

• ActiveX

• Hypertext Preprocessor (PHP)

• etc
Principles of Information Systems, Se 41
venth Edition
Web search engine
• Web search engine is a tool used to search file on Web.
• For example :

Principles of Information Systems, Se 42


venth Edition
Key words
1. Home page
• The first document you see is home page When
you brows the Web
• This is acts as a starting point for the
connection between that individual or
organization and the rest of the World Wide
Web.
Key words..
2. Hyperlinks
• Is a word ,a group of word, or image that enable you to access
another web page or a new section within the current
document.
– Hyperlinks enable to link
• document to another part of the same document ,
• to another document on the same server or
• to another document on other server.
• To images,
• To video and
• to sound.
Key words..
• When you click the hyperlink, your computer sends a
message called an HTTP request.
• The Web server receives the request, and looks within
its stored files for the Web page you requested.
– When it finds the Web page, it sends it to your computer, and your Web
browser displays it.
– If the page isn’t found, you see an error message, which probably includes
the HTTP code for this error: 404, “Not Found.”
• Your mouse cursor will turn to a "pointing finger" when
you've found a hyperlink.
Key words..
3.HyperText
• Hypertext is a document that contains Hyperlinks.
• A single hypertext document can contain links to many
documents.
• Producing hypertext for the Web is accomplished by
using a language called HYPERTEXT MARK UP
LANGUAGE, or HTML.
Key words..
4.Web Browser
• A web browser is the computer program
used to retrieve and display web pages.
• The most popular browsers are :
– Microsoft Internet Explorer and
– Netscape Navigator.
Key words..
5. Web page
– Page that contain information and links on the
Internet.
Key words..
6. web site
• A web site is a collection of related web pages
stored on a web server.
– web server is a computer which is permanently
connected to the Internet.
7.Internet service provider (ISP)
• any company that provides Internet access
8.Browsing the Web
• Browsing the Web means
– when you write the URL of a given document
– the server sends web page with
hyperlinks(clickable content it link to other web page
).
– If you click one of hyperlinks another http request
goes to the server ,
– this continue until the information seeker satisfied
with the information
Summary
Web and Internet are not the same thing?
• The Internet is a collection of computers or
networking devices connected together.
– They have communication between each other.
• The Web is a collection of documents that are
interconnected by hyper-links.
– These documents are accessed by web browsers and
provided by web servers.

CSC1720 – Introduction to
Internet
All copyrights reserved by C.C. Cheu 52
ng 2003.
Client- server architecture
Client Server Architecture
• There are many types of network architecture
that are present and among these, there is a
very well-known one that is known as client
server architecture.
• It is a network architecture in which each
computer on the network is either a client or
a server
“I want to
collaborate
with my
“I want to access colleague”
some information”

Client

Server Peer-to-peer

Client/server
Components
• Clients
• Servers
• Communication Networks

Server

Client
Clients
• it is a computer that request service to the
server.
• The clients that are present in the network are
dependent on the server, for all their
resources(for example printer, file, etc) and
also for the purpose of processing power.
Servers
• it is a computer that manage network resources. For example:
– A computer that manage Disk drives present in the network (file
servers)
– A computer that manage Printers present in the network (print
servers)
– A computer that manage Network traffic in the network (network
servers)
– A computer that manage mail( mail servers)
– A computer that translate the URL in to IP address(DNS server)
– A computer that manage database (Database Server)
• For example it process query request
– A computer that manage resources on web(web servers)
• For example it processing browsers request and response to request.
How Client- server works…
• As web developer it is important to know How web works
• Browser (client)make request page based on the link you click or
the address you type
– When the browser make request ,it use URL to locate
requested content
– For example URL=http://www.yahoo.com
– This request usually pass on to DNS server ,the DNS then
translate the URL in to IP address and send to the browser.
– The browser then use this IP address to locate host server and
send request for the content.
– The server then sends response and the Browser displays the
page based on the HTML tags.
Type of client-server architecture
• 1-tier architecture
• 2-tier architecture
• 3-tier architecture
• 4-tier architecture
• .
• .
• .
• n-tier architecture
1-tier architecture

Main Frame

Processing of data only takes place in the server and different


machines attached to it used as display terminals.
OR
• processing take place at individual terminals and a
centralized machine called file server just stores the
files .
1. Ask For File

2. File

4. Return File
3.Processing

Client File Server


2-tier architecture

User HTTP Request

Response to HTTP Request

Client
Web Server

Processing of HTML code takes place on the client side


and the web page request is processed on the server side
3-tier architecture

1. User HTTP Request 2

4. Response to HTTP Request 3

Client
Web Server DBMS

In a 3-tier architecture, we can place our database management system


or application software on a different processing zone or tier
• Similarly in a 4-tier architecture ,for example, we can place the
payment processing system at the 4th tier.
• we can divide the client server architecture into
n – tiers.
– For example We can divide e-commerce sites up to n-tier architectures.
• Note :
– sites which have to deliver millions of individual pages and
process thousand of customer and vendor transactions each
day, site administrators must plan carefully how to configure
their web server computers.
OPERATING SYSTEMS FOR WEB SERVERS

• Microsoft Windows NT Serve


• Microsoft Windows 2000 Advanced Server
• Microsoft. NET Server
• Linux or Unix based operating systems such as
Solaris.
Note
• One server generally supports numerous
clients, and multiple servers can be networked
together in a pool to handle the increased
processing load as the number of clients
grows.
•The end

You might also like