Web Application Basics

Different Actors in Web application

There are different actors which comes into picture of web application.

  • End User
  • Web Client(Browser Application)
  • Server(Web Server / Application Server)
  • Actual Page requested on Server

User : It’s the end user who actually raise the request for a page on Server or submit a form.

Web Client : Browsers(IE, Firefox..) are software that knows how to communicate with servers using HTTP protocol and render the page recieved from server in the form of HTML.

Server : Servers are kind of software which handle the user request and search for the content requested by end User and return the appropriate result(Requested Page or Error Code). Server can be of two type web server and App Server. It’s web server which directly handles the user request and pass it to app server to process.

 

What is HTML

HTML(Hyper text markup Language) is a language used by servers to send the response to Browser’s so that they(Browsers) can render the page properly on user side.

What is HTTP Protocol

HTTP(Hyper Text Transfer Protocol) is protocol used by client(Browser) and server(Web Server) to communicate.  HTTP has web specific featured that  runs on TCP/IP protocol. Structure of HTTP conversation can be divided in two types, HTTP Request or HTTP Response.

Note*: HTML can be the part of HTTP protocol response.

HTTP Request

When ever end User clicks any link or submit any form browser send HTTP Request to Server so that server can process it and provide the HTTP Response.

HTTP Request’s are of different kind. HTTP has several methods which inform the server about the kind of Request is being made by browser.

Methods in HTTP Protocol

  • GET
  • POST
  • PUT
  • DELETE
  • HEAD
  • TRACE
  • OPTION
  • CONNECT
GET and POST are the method which is used mostly in web environment and we will discuss only those.

GET method is the default method which will be used by Browser(If not specified explicitly). GET method is used by browser to ask(Not submitting any data) for some kind of resources on server(HTML, Image, PDF  etc..).

POST method is used by browser to send some information to server for processing. Eg.  Form Submission..

HTTP Request Example

 

Difference between GET and POST method

GET method used for asking some data from server. While POST is used for submission some data to server.

GET is idempotent while POST is not idempotent.

GET do not have any BODY part while POST has.

GET can submit some data but that will be the part of Header  and there is limitation on data submitted via GET method while Post can submit data in body part and there is no restriction on data that can be submitted in POST request.

HTTP Response

This is what server send to user client(Browser) when user ask for something from Server(GET / POST Request). HTTP Response contains Header and a Body part.

HTTP Response Header Contains below information along with others

  • Protocol Version(Used by web server)
  • HTTP Status Code(Successful/Fail/Not Found….)
  • Content Type (MIME Type)
  • Content Length
  • Date
  • Server details

Content Type(content-type) in header part of HTTP response is also known as MIME type. This information is used to tell the browser the kind of data server is sending,  weather it is Image or Text or PDF or anything else. According to this information Browser will know how to handle the data.

HTTP Response, Body part contains the HTML or other content that needs to be rendered by Browser on client side.

HTTP Response Example

 

10 Comments Web Application Basics

Leave A Comment

Your email address will not be published. Required fields are marked *