SlideShare a Scribd company logo
Basic Web Architecture
and REST Api Calls
The WEB APP
The web is a two-tiered architecture
● A web browser (The Client) that displays information.
● A web server that transfers information to the client
The Technologies
● On Client Side: HTML, CSS, JavaScript ...
● On Server Side: PHP, JavaScript, Java …
Their common knowledge is made mainly of URI and HTTP
● the URI (Universal Resource Identifier) has 4 parts: the protocol type, web
server domain, folder path (optional), web page HTML file (optional)
● HTTP (HyperText Transfer Protocol) is a request/response standard of a
client and a server.
How it works
● An HTTP client initiates a request
● Resources to be accessed by HTTP are identified using URIs
The request message consists of the following:
● Request line
● Headers
● An optional message body
Request Methods
The HTTP methods, also known as “verbs” are:
● HEAD
● GET
● POST
● PUT
● DELETE
● TRACE
● OPTIONS
● CONNECT
Safe Methods
● HEAD, GET, OPTIONS and TRACE are defined as safe (they only retrieve
information)
● POST, PUT, DELETE are intended for actions on your data
HTTP response
The first line of the HTTP response is called the STATUS LINE. Status Code is
part of it.
● Success: 2xx
● Redirection: 3xx
● Client-Side Error: 4xx
● Server-Side Error: 5xx
Examples: 200, 202, 301, 304, 404, 500
Client Request Example :D
● Request Line: POST localhost:8080/users/login
● Headers: Content-Type: application/json
● Body:
{
"email": "ralu.mihordea@ultragrup.ro",
"password": "ltMrQyX4"
}
Server Response Example
Status Line: 200 Ok
Body:
{
"status": true,
"errorMessage": "",
"payload": {
"userAuthToken": "eyJ0eXukhJev2iFRibQq09VWIS9Ap_rpiTc"
}
}
HTTP session state
● HTTP is a stateless protocol
● Hosts do not need to retain information about users between requests.
● Statelessness is a scalability property
● Solutions to this:
○ Cookies
○ Sessions
Cookie
● Cookie is a small piece of text stored on a user’s computer by a web browser
● A cookie consists of one or more name-value pairs containing infos like user
preferences
● Commonly used for: authenticating, shopping cart items, session tracking and
remembering specific information about users
Session
● server side storage of information
● persists throughout the user’s interaction with the site
● only a unique identifier is stored on the client (session id)
● For each HTTP request the session id is passed. The site pairs this session id
with it’s internal database and retrieves the stored variables for use by the
requested page.
Bibliography
● http://www.lassosoft.com/Tutorial-Understanding-Cookies-and-Sessions
● http://www.slideshare.net/cchamnap/introduction-to-web-architecture?qid=08
4fc228-f93f-4f32-ba77-cd827bacd537&v=&b=&from_search=1

More Related Content

PPTX
Introduction to Web Architecture
PPTX
Form Validation in JavaScript
PDF
JavaScript - Chapter 12 - Document Object Model
PDF
JavaScript - Chapter 13 - Browser Object Model(BOM)
PDF
Javascript basics
PPTX
Html list
PDF
Php introduction
PPT
Web Standards
Introduction to Web Architecture
Form Validation in JavaScript
JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 13 - Browser Object Model(BOM)
Javascript basics
Html list
Php introduction
Web Standards

What's hot (20)

PPTX
Scripting languages
PPTX
HTTP request and response
PPTX
Introduction to php
PPTX
Php.ppt
PPT
PPTX
Introduction to ASP.NET
PPTX
Web application architecture
PPT
Web Servers (ppt)
PPTX
Looping statement in vb.net
PPT
Web Fundamentals
PPTX
VB Script
PPS
Web Site Design Principles
PPSX
Php and MySQL
PPTX
Web Application
PPT
PHP variables
PPT
Js ppt
PPTX
Static and Dynamic webpage
PDF
6. Web Publishing
PDF
Intro to Asynchronous Javascript
PPT
Control Structures In Php 2
Scripting languages
HTTP request and response
Introduction to php
Php.ppt
Introduction to ASP.NET
Web application architecture
Web Servers (ppt)
Looping statement in vb.net
Web Fundamentals
VB Script
Web Site Design Principles
Php and MySQL
Web Application
PHP variables
Js ppt
Static and Dynamic webpage
6. Web Publishing
Intro to Asynchronous Javascript
Control Structures In Php 2
Ad

Similar to Basic web architecture (20)

PPTX
World wide web architecture presentation
PPTX
Introductiontowebarchitecture 090922221506-phpapp01
PPTX
REST & RESTful Web Service
PPT
Ch-1_.ppt
PDF
Communicating on the web
PPTX
computer network introduction. psc notes . Assisant professor in cse.
PPTX
Browser
PDF
Ch 3: Web Application Technologies
PDF
Web Services PHP Tutorial
PPT
Clients and Servers.ppt
PPTX
Hyper_Text_Transfer_Protocol_Presentation_
PPTX
Chapter 1.Web Techniques_Notes.pptx
PPTX
SCWCD : The web client model
PPTX
SCWCD : The web client model : CHAP : 1
PDF
Web architecturesWeb architecturesWeb architectures
PPTX
IP UNIT 1.pptx
PDF
02 - Asassssssspplication Layer (HTTP).pdf
PPTX
Web Database
PDF
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
PPTX
Www and http
World wide web architecture presentation
Introductiontowebarchitecture 090922221506-phpapp01
REST & RESTful Web Service
Ch-1_.ppt
Communicating on the web
computer network introduction. psc notes . Assisant professor in cse.
Browser
Ch 3: Web Application Technologies
Web Services PHP Tutorial
Clients and Servers.ppt
Hyper_Text_Transfer_Protocol_Presentation_
Chapter 1.Web Techniques_Notes.pptx
SCWCD : The web client model
SCWCD : The web client model : CHAP : 1
Web architecturesWeb architecturesWeb architectures
IP UNIT 1.pptx
02 - Asassssssspplication Layer (HTTP).pdf
Web Database
446-FUNDAMENTALS OF WEB FOR NON DEVELOPERS (Useful-Knowledge)
Www and http
Ad

More from Ralu Mihordea (6)

PDF
Fragmente de Rafinament
PDF
echinoctiuDivin.pdf
PDF
Time Lapses on Automation
PDF
Bug reporting
PDF
Documentation in Software Testing
PPTX
Automation With Frank
Fragmente de Rafinament
echinoctiuDivin.pdf
Time Lapses on Automation
Bug reporting
Documentation in Software Testing
Automation With Frank

Recently uploaded (20)

PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
medical staffing services at VALiNTRY
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Cost to Outsource Software Development in 2025
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PPTX
Transform Your Business with a Software ERP System
Advanced SystemCare Ultimate Crack + Portable (2025)
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Operating system designcfffgfgggggggvggggggggg
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
medical staffing services at VALiNTRY
Autodesk AutoCAD Crack Free Download 2025
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Patient Appointment Booking in Odoo with online payment
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Odoo Companies in India – Driving Business Transformation.pdf
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Cost to Outsource Software Development in 2025
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Oracle Fusion HCM Cloud Demo for Beginners
Transform Your Business with a Software ERP System

Basic web architecture

  • 1. Basic Web Architecture and REST Api Calls
  • 2. The WEB APP The web is a two-tiered architecture ● A web browser (The Client) that displays information. ● A web server that transfers information to the client
  • 3. The Technologies ● On Client Side: HTML, CSS, JavaScript ... ● On Server Side: PHP, JavaScript, Java … Their common knowledge is made mainly of URI and HTTP ● the URI (Universal Resource Identifier) has 4 parts: the protocol type, web server domain, folder path (optional), web page HTML file (optional) ● HTTP (HyperText Transfer Protocol) is a request/response standard of a client and a server.
  • 4. How it works ● An HTTP client initiates a request ● Resources to be accessed by HTTP are identified using URIs The request message consists of the following: ● Request line ● Headers ● An optional message body
  • 5. Request Methods The HTTP methods, also known as “verbs” are: ● HEAD ● GET ● POST ● PUT ● DELETE ● TRACE ● OPTIONS ● CONNECT
  • 6. Safe Methods ● HEAD, GET, OPTIONS and TRACE are defined as safe (they only retrieve information) ● POST, PUT, DELETE are intended for actions on your data
  • 7. HTTP response The first line of the HTTP response is called the STATUS LINE. Status Code is part of it. ● Success: 2xx ● Redirection: 3xx ● Client-Side Error: 4xx ● Server-Side Error: 5xx Examples: 200, 202, 301, 304, 404, 500
  • 8. Client Request Example :D ● Request Line: POST localhost:8080/users/login ● Headers: Content-Type: application/json ● Body: { "email": "[email protected]", "password": "ltMrQyX4" }
  • 9. Server Response Example Status Line: 200 Ok Body: { "status": true, "errorMessage": "", "payload": { "userAuthToken": "eyJ0eXukhJev2iFRibQq09VWIS9Ap_rpiTc" } }
  • 10. HTTP session state ● HTTP is a stateless protocol ● Hosts do not need to retain information about users between requests. ● Statelessness is a scalability property ● Solutions to this: ○ Cookies ○ Sessions
  • 11. Cookie ● Cookie is a small piece of text stored on a user’s computer by a web browser ● A cookie consists of one or more name-value pairs containing infos like user preferences ● Commonly used for: authenticating, shopping cart items, session tracking and remembering specific information about users
  • 12. Session ● server side storage of information ● persists throughout the user’s interaction with the site ● only a unique identifier is stored on the client (session id) ● For each HTTP request the session id is passed. The site pairs this session id with it’s internal database and retrieves the stored variables for use by the requested page.