Thursday, 4 September 2014


Today we are going to learn about URI and HTTP

Uniform Resource Identifier:

A Uniform Resource Locator (URL) is used to address  a document on the Web.
• The name that corresponds to an IP address in the DNS is known as a URL
• A full Web address is like:
– http://www.scss.tcd.ie/Owen.Conlan/php/xpath/index.html
• A URL usually follows these syntax rules:
– scheme://host.domain.country_code:port/path/filename
Retrieving a URL
TCP/IP is a collection of communication protocols that controls the way that information is broken up and posted over the Internet.
HTTP takes care of the communication between a web server and a web browser.
• To retrieve a Web resource, the user either specifies a URL in the Web browser’s address or clicks on a hyperlink <a> in a document.
HTTP is used for sending requests from a web client (a browser) to a web server, returning web content (web pages) from the server back to the client.
• The Web browser specifies the details of the required Web page in a HTTP Request message
• The Web server receives this request and after processing it completes the operation by returning either the document or an error in the HTTP Response message.

HTTP (HyperText  Transfer Protocol):

It is one of the Application Layer Protocol.  How do applications interact with each over a network or the internet?
Example:
HTTP(S)                          Websites and Documents
FTP                                  Files
SMTP,POP,IMAP            E-Mail

HTTP is a protocol for distributed hypertext and hypermedia. Used by Web Client (browser) and Web Server to communicate.

http request Details

HTTP REQUEST

Message indicating the client wants to a piece of hypertext or hypermedia from the server

                                                                  /*header
POST /Login.php HTTP/1.1!                 //REQUEST TYPE(POST)
Host: www.website.com!
User-Agent: Mozilla/5.0 !                      *  header
Content-Length: 27!                                 *header
Content-Type: application/x-www-form-urlencoded      */
userid=joe&password=guessm!             //body   



REQUEST TYPE:

·         GET: Received document on URL"
·         POST: Send information to server on URL"
·         PUT: Replace document on URL"
·          DELETE: Remove document on URL"
·          HEAD: Received headers from document on URL"
·         OPTIONS: Request options for this server"
REQUEST HEADER:
Content Length: the length of the content
User-Agent: Sending application
Date: Date J
Host*: Receiver.
 Others…

HTTP RESPONSE:

HTTP/1.1 200 OK!  //Response Code
Date: Thu, 08 Apr 2004 18:24:33 GMT!    /*
Server: Apache/1.3.29 (Unix) PHP/4.3.4!  *
X-Powered-By: PHP/4.3.4!                 *
Content-Language: nl!                    *
Content-Type: text/html;                 * header
charset=iso-8859-1!                      *
X-Cache: MISS from wikipedia.org!        *
Connection: close!                       *
Content-Length: 49!                      */
<html><head></head><body></body></html> //body
RESPONSE CODE!
 1xx: informal message by server"
 2xx: successful HTTP request"
 3xx: redirection"
 4xx: client error in HTTP request"
 5xx: server error"
 6xx: proxy error"
MOST COMMON!
 401 (unauthorized)
 400 (bad request)
 403 (forbidden)
 404 (not found)
 500(internal server error)

RESPONSE HEADER:
Content Length: the length of the content
 Content Type: type of content
 Server: Type of server
 Date: Date
 Host*: Receiver.
 Others…

 Hope, you will understand the HTTP protocol and its role on the internet.

Stay tuned for next discussion on HTML.

Tuesday, 19 August 2014

Want to become a web developer from scratch!!!

Want to become a web developer from scratch!!!

Follow my posts!!

Today we are going to learn the difference between INTERNET and WWW:

The expansion of Internet is INTERconnected NETwork. The Internet is a giant network of networks. A network may include PCs, and other devices like servers or printers. A network is connected through a communication channel like coaxial cable, Optical Fiber, air.

The World Wide Web (WWW or Web) was discovered in 1989 Tim Berners-Lee created a set of technologies  that allowed information on the Internet to be linked together through the use of links, or connections in documents.

Keep in mind that Internet act like a hardware and WWW acts as a Software.

The concept of the WWW combines 4 ideas:
  • hypertext (a text that contains another text) - Term “Hypertext” was coined by Ted Nelson in 1963.
  • resource identifiers (URI, URL) Uniform Resource Locator e.g.: http://www.google.com
  • client-server model of computing (web servers/browsers)
  • markup language (HTML) (A language that contains tags e.g.,<body>,<a>etc.,)


The client-server architecture of the internet
The Client-Server Architecture of the Internet

Tasks on Day1:
Find what is URN? How it is different fom URL.
Write 4 example URL e.g.: http://www.google.com?
In the above diagam which acts as the client on the Internet either web server or web browser? Justify your Answer.