Client Server Concept

  • 1. Client - Server communication

    Basics

    1. Client

    Client is a machine or application which send the request to the server machine

    Eg:

    1. Browsers : Chrome, Firefox, Safari etc…
    2. Mobile Applications
    3. Postman tool
    4. Filezilla
    5. terminal /CMD

    2. Server

    Server is a machine or application which receive the request from the client and return the response to the client

    Eg:

    1. Apache for PHP applications
    2. IIS for dot net applications
    3. Tomcat for Java applications

    3. files

    Eg:

    1. html
    2. css
    3. js
    4. images

    1. All above files are stored in the server. Note that Developers host / upload the php, html, css, js and image files to the server

    2. Server does not use/execute the html file, css file , js files and images

    3. Html , css and javascript files are render or execute in the browser

    4. protocol

    Protocol is like language to communicate between humans.

    Protocol is a set of rules or procedures for transmitting data between electronic devices, such as computers. Protocol is used to communicate between client and server.. Different protocols are http, ftp, ssh, rdp etc.

    Working flow

    1. User enter the website url in the address bar of browser

    2. Browser send the http request to the server

    3. Server executes the php file .

    4. Server returns html file.

    Server does not return the PHP code to the client

    5. Browser receives the html file and render the html tags

    6. Browser calls css/images/js files which used in the html file.

    7. Browser applies the css properties to the html tags

    8. Browser shows images

    9. Browser executes the javascript code