Basic Terms Before Diving into Web Development

Network

A network is a collection of two or more computers connected to each other.

We create a network to:

  • Share system resources (printer, files, internet)
  • Exchange information

Each computer in a network is called a node.

The Internet is called a network of networks.


Client

A client is a computer that requests information.

Example:

  • Your computer or mobile phone when you open a website


Server

A server is a computer that stores information or provides services to clients.

Types of servers include:

  • Database server
  • File server
  • Movie server
  • Internet server
  • Printer server

IP Address

In a network, every device is identified using an IP Address.

An IP Address is a unique number given to a computer or device.


Port

A port number is used to identify a specific application running on a server. Port numbers range from 0 to 65535, and some of these ports are reserved for well-known services.


Browser

A browser is a software used to open and navigate websites.

Examples of browsers:

  • Microsoft Edge
  • Mozilla Firefox
  • Google Chrome
  • Opera
  • Safari

A browser is also called a web client.

When you open a website in a browser, the browser acts as the actual client.


Web Server

A Web Server is a type of software that serves web resources.

Every resource on the web has a unique address, called a URL.

When a user requests a web page through a browser:

  • The browser sends a request
  • The web server sends the response

Ways to Request a Resource

A resource can be requested in the following ways:

  • Put the URL in the address bar of the browser and hit enter
  • Click a hyperlink on a web page
  • Fill a form and click the submit button
  • Send a request using a program

The format of a request is IP_address:Port_number


HTTP Request and Response
  • A request sent by the browser is called an HTTP Request
  • A reply sent by the server is called an HTTP Response

Types of Web page

Static Web page
  • Does not take input from users
  • No database or file handling or XML or JSON is used
  • Looks the same for all users

Example:

  • about page, history page, policy page etc.

Dynamic Web page
  • Takes input from users
  • Stores data using database or file handling or XML or JSON
  • Looks different for different users

Example:

  • Gmail, Facebook

If 5 users open Gmail:

  • Each user sees a different inbox

HTTP (HyperText Transfer Protocol)

The Web Server and Web Client (Browser) communicate using HTTP.

Because of this:

  • A Web Server is also called an HTTP Server

HTTP allows:

  • Browsers and servers to exchange data
  • Communication over the Internet or an Intranet

Important points:

  • A Web Server runs 24×7
  • The client always starts the communication
  • A server never contacts a client directly

Localhost

Localhost refers to the same computer you are working on. In other words, it refers to the same system from which a request is made.

The IP address for localhost is 127.0.0.1
An internet connection is not required to run localhost.

We usually use localhost to test websites on our computer. Sometimes, we use localhost in coding to connect to a database server that is running on the same computer.