Internet Programming - Chapter One
Internet Programming - Chapter One
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
– 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
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
• 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 :
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
2. File
4. Return File
3.Processing
Client
Web Server
Client
Web Server DBMS