Skip to content

2. Introduction to Web World

dinanathsj29 edited this page Feb 12, 2019 · 5 revisions

Section 2. Introduction to Web World

2.1. How does the web work?

The Internet

Massive networks of millions of computers all over the world that use to share and transmit information trough following protocols/mediums

  • Email
  • Sms messaging
  • Application data
  • World Wide Web

World Wide Web (WWW)

  • Runs over the Internet
  • Transfer data using HTTP (Hyper Text Transfer Protocol)

The Web

Communication/series of interaction between Clients & Servers

Clients

Devices which requests and renders web contents. Some of the popular clients are Browsers, Mobile Apps, Screen Reader Devices etc

Servers

Applications which deliver Web Contents, Services to Clients

2.2. Client-Server Interaction Model

Browser

  • The browser is Software/application helps to visit, view, accessing information and take the best use of websites/web pages
  • Popular browsers are Google Chrome, Mozilla Firefox, Internet Explorer, Safari etc.

Request <--> Response Mechanism

1. User Type in `URL (Uniform Resource Locator)` like `http://www.yahoo.com` -> 
2. URL passed to `DNS (Domain Name Server)` -> 
3. DNS translates URL into `IP (Internet Protocol)` address (`172.16.0.0`) -> 
4. Browser use DNS to locate host server and send request of content (in the form of HTML page, Images, CSS, JavaScript).

    Client Server, Request Response Mechanism
    Image - Client Server, Request Response Mechanism

Static Sites

Simply shows content (which is not change frequently) requested by the client without any additional processing (Static sites pages usually consists of Front end technologies like HTML, CSS, JavaScript)

Dynamic Sites

First Business Logic execute by Web Applications like ASP, PHP, Ruby on Rails etc. than browser shows content (latest/updated) requested by the client (Dynamic sites pages usually consists of Front end technologies like HTML, CSS, JavaScript, in combination with some Back end technology like ASP, PHP, Ruby on Rails etc.)

2.3. DNS (Domain Name Server)

  • Every site have unique IP (Internet Protocol) address used to identify location (http://www.google.com = 169.20.127.243)
  • DNS (Domain Name Server) is like Internets phone book which stores unique website and its IP (Internet Protocol) address for each and every website
  • IP Address == Domain Name Server (172.16.0.0 == domain name http://www.yahoo.com or so)

2.4. Internet Protocol

  • Protocols are simple languages/standards/set of rules through which computers share information which each other

  • Internet wouldn't work at all without Protocols

  • Different/multiple layers of protocols

    • Application Layer (creation & sharing of data over the web)
      • HTTP (Hyper Text Transfer Protocol)
      • FTP (File Transfer Protocol)
      • SMTP (Simple Mail Transfer Protocol)
      • DNS (Domain Name Server)
      • RIP (Routing Information Protocol)
      • SNMP (Simple Network Management Protocol)
    • Transport Layer (communication)
      • TCP (Transmission Control Protocol and Internet Protocol created in 1973)
      • UDP (User Datagram Protocol)
    • Internet Layer (address and routing structure of data)
      • IPv4 (Internet Protocol Version 4)
      • IPv6 (Internet Protocol Version 6)

2.5. HTTP (Hyper Text Transfer Protocol)

  • Standard protocol for transferring data/resources over the Web
  • In case of HTTP, Browsers are HTTP Clients, send HTTP request and Servers are HTTP Servers, send the HTTP response to transfer data with a standardized format
  • HTTP is one-way stateless protocols, it simply means that once the REQUEST sent & RECEIVED than that state is forgotten ie discarded by the browser and web server, which makes HTTP very much simple and efficient
  • Due to one way stateless nature its difficult to send and receive OR upload and download large files with HTTP.

Some Common web protocols

  • FTP (File Transfer Protocol) Typically used to transfer large files and its ideal for uploading or downloading files to your site
  • SMTP (Simple Mail Transfer Protocol) The Standard web protocol for sending email across the web. Most email clients use SMTP for sending and receiving emails
  • POP (Post Office Protocol) POP typically used to receive emails.
  • RTP (Real-Time Transfer Protocol) Standard protocol for delivering/serving audio or video over the web. Its commonly used in voice over and chat applications.
  • RTMP (Real Time Messaging Protocol) Developed by Macromedia (Adobe Corp.) for streaming audio video and data over the Internet, between a Flash player and a server.
  • HTTPS (Hypertext Transfer Protocol Secure) HTTP layered with a security protocol. Usually used for e-commerce or other secure transactions, payment gateways.

2.6. URL (Uniform Resource Locator)

URL Uniform Resource Locator OR (Universal Resource Locator) specifies its location on a computer network (web address, web path, web site name).

Anatomy/contains of URL

URL = http://www.yahoo.com

URL Parts Meaning/Description
http protocol
//www.yahoo.com:8080 resource name
www sub-domain (Most of cases sub-domain is not required ie you can type http://yahoo.com)
yahoo domain name
com top-level domain

URL path/port

http://www.yahoo.com/products/product1.html

http://www.yahoo.com:80 (80 = port number (80 is default port))

Top level domain

  • .com
  • .net
  • .org
  • .info

2.7. How browser works

The browser uses HTTP to communicate with Web Server and request pages, content. Browsers rendering engine translates/renders pages and displays the contents as per support.

Why browsers behave differently

  • Browsers developed independently of each other
  • Multiple rendering engines drive page layout
  • DOM (Document Object Model) support varies
  • Browsers use independent JavaScript engines

Common Rendering Engines

Engine Browser
Trident Internet Explorer, (AOL - America Online), Windows Mobile
Presto Opera
Gecko Mozilla FF, Camino
Webkit Safari, Google Chrome, WebOS
Blink Google Chrome, Opera 14+

2.8. W3C and Web standards (World Wide Web Consortium)

  • W3C (World Wide Web Consortium) is main International Standards Organization for the World Wide Web help in developing protocols and guidelines` that ensure long-term growth for the Web
  • W3C (World Wide Web Consortium) started in the year 1994 to issue recommendations for web technologies
  • Check web standards for consistent design (The Web Standard Project): www.webstandards.org
  • W3C website: https://www.w3.org/

2.9. Web Server

Websites are hosted/uploaded on Web Server. Web Server is nothing more than normal computer installed with specialized software and components for a specific use. Web stacks are groups of software that work with each other to build and process websites (static & Dynamic websites).

Web stacks consists of

  • OS (Operating System)
  • Web Server
  • Database Server
  • Programming Language

Common web stacks

Web Stack Full Form (Technologies)
LAMP Linux Apache MySql Php / Linux Apache MySql Perl/Python
MAMP Macintosh Apache MySql Php
WAMP Windows Apache MySql Php
WISA Windows IIS MS SQL .NET
MARS MySql Apache Ruby Solaris