SlideShare una empresa de Scribd logo
1 de 20
Intro to the WWW
SACHEEN DHANJIE
Sacheen Dhanjie
Senior Developer @ Afrihost.com
So you want to learn how to
code?
• Coding takes time, practice and
patience.
• Don’t give up, there’s always a solution.
• Think logically.
Hyper Text Transfer
Protocol• <protocol>://<subdomain><server><port:80><path>
• sacheen.plex.com:32400/web/index.html
• Request / Response
• Client initiate’s a request
• Server generates a response
• HTTP is stateless
• Server /Client does not keep record of the connection
Request / Response
Request/Response
• Each Request contains information:
• The HOST: www.google.com
• The COOKIES: This may contain a session that the server can use to
identify you - because http is stateless
• The CONTENT: what kind information you sending the server
• The METHOD that the server needs to perform,
GET,PUT,POST,DELETE
• There are other parameters sent to the server, but the above covers the
basics
Request/Response
Request/Response
• Each Response contains information:
• The STATUS: the code that determines the success or failure of a
request,
• 200, 500, 404, 503, 301, 302…etc
• The CONTENT: The data sent back by the server
• There is more information sent back, but the above is the the most
important
GET
• Get data from the server
POST
• Update/Create data on the server, most developers use POST as creation as well
PUT
• Create/Update data on the server
DELETE
• DELETE’s data from the server
HEAD
• Identical to GET except that the server MUST NOT return a message-body in the
response.
OPTIONS
• Represents a request for information about the communication options available on
the request/response chain identified
GET
• Request
• URL: https://www.afrihost.com/
• Content: none
• Response:
• CONTENT: the page you requested
• STATUS: 200
POST
• Request
• URL: https://www.afrihost.com/testimonial
• Content: name=bob&age=5&message=amazing site
• Response:
• CONTENT: some success page
• STATUS: 200
PUT
• Request
• URL: https://www.afrihost.com/testimonial
• Content: name=bob&age=5&message=amazing site
• Response:
• CONTENT: some success page
• STATUS: 200
DELETE
• Request
• URL: https://www.afrihost.com/testimonial/100
• Content: id=100 [the spec does not forbid or discourage it]
• Response:
• CONTENT: some delete success page
• STATUS: 200
Examples
POST /en/api/of/telkom-lines-speed HTTP/1.1
Host: clientzone.trunk
Cache-Control: no-cache
Postman-Token: 4977bd45-aea9-c84b-4b15-94e909fd7e76Content-
Type: multipart/form-data; boundary=----
WebKitFormBoundary7MA4YWxkTrZu0gW----
WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="number"0119185642----
WebKitFormBoundary7MA4YWxkTrZu0gW
Examples
PUT /en/api/of/telkom-lines-speed HTTP/1.1
Host: clientzone.trunk
Cache-Control: no-cache
Postman-Token: 2719f53b-8f52-3318-f154-ccf9adc224f2Content-
Type: multipart/form-data; boundary=----
WebKitFormBoundary7MA4YWxkTrZu0gW----
WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="number"0119185642----
WebKitFormBoundary7MA4YWxkTrZu0gW
Examples
GET /en/api/of/dsl-lines-products HTTP/1.1
Host: clientzone.trunk
Cache-Control: no-cache
Postman-Token: 28c6208a-25ba-8fb2-8678-d0b4871fc2bc
Accessing data in PHP
• $_GET[“data”]; //somepage.com/?data=steve
• $_POST[“data”] somepage.com/some-path Content: data=steve
• parse_str(file_get_contents('php://input'), $put) put data is sent
via stdin $put[“data”]
Examples
Afrihost Usage Example:
• https://clientzone.afrihost.com/order/#/
• Afrihost Mobile App
Closing
• The request-response conversation is the fundamental process that
drives all communication on the web.
• Regardless of the language you use, the type of application you build
(web, mobile, JSON API) or the development philosophy you follow,
the end goal of an application is always to understand each request
and create and return the appropriate response
• KISS – KEEP IT SIMPLE STUPID – don’t over complicate things
• Do one thing and do it well
Links
• https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
• http://symfony.com/doc/current/book/http_fundamentals.html
• http://stackoverflow.com/questions/671118/what-exactly-is-restful-
programming
• https://packagist.org/packages/sacheen/rest-hook-bundle
• http://php.net/manual/en/features.file-upload.put-method.php

Más contenido relacionado

La actualidad más candente

Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressDanilo Ercoli
 
WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesDanilo Ercoli
 
Content Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme developmentContent Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme developmentDave Wallace
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshopBoston WordPress
 
CQ5.x Maintenance Webinar 2013
CQ5.x Maintenance Webinar 2013CQ5.x Maintenance Webinar 2013
CQ5.x Maintenance Webinar 2013Andrew Khoury
 
Installing wordpress
Installing wordpressInstalling wordpress
Installing wordpressDave Wallace
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress themeDave Wallace
 
Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Web Directions
 
Joomla! Installation
Joomla! InstallationJoomla! Installation
Joomla! Installationghessler
 
Lg conf upgrade migrate and virtualisation with share-point 2010
Lg conf   upgrade migrate and virtualisation with share-point 2010Lg conf   upgrade migrate and virtualisation with share-point 2010
Lg conf upgrade migrate and virtualisation with share-point 2010Alan Richards
 
Website Launch Tips
Website Launch Tips Website Launch Tips
Website Launch Tips Optimum 7
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站areyouok
 
10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE SiteLeslie Doherty
 
Website Performance
Website PerformanceWebsite Performance
Website PerformanceHugo Fonseca
 
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...Paul Thompson
 
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...cehwitham
 

La actualidad más candente (18)

Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database Users
 
WordPress Development Tools and Best Practices
WordPress Development Tools and Best PracticesWordPress Development Tools and Best Practices
WordPress Development Tools and Best Practices
 
Content Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme developmentContent Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme development
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshop
 
CQ5.x Maintenance Webinar 2013
CQ5.x Maintenance Webinar 2013CQ5.x Maintenance Webinar 2013
CQ5.x Maintenance Webinar 2013
 
Installing wordpress
Installing wordpressInstalling wordpress
Installing wordpress
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress theme
 
Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5Dave Orchard - Offline Web Apps with HTML5
Dave Orchard - Offline Web Apps with HTML5
 
Joomla! Installation
Joomla! InstallationJoomla! Installation
Joomla! Installation
 
Lg conf upgrade migrate and virtualisation with share-point 2010
Lg conf   upgrade migrate and virtualisation with share-point 2010Lg conf   upgrade migrate and virtualisation with share-point 2010
Lg conf upgrade migrate and virtualisation with share-point 2010
 
Website Launch Tips
Website Launch Tips Website Launch Tips
Website Launch Tips
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
 
10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
 
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...
 
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
 
Hosting
HostingHosting
Hosting
 

Destacado

E-ticaret ve Girişimcilik
E-ticaret ve GirişimcilikE-ticaret ve Girişimcilik
E-ticaret ve GirişimcilikMonitise MEA
 
DO Binissalem en el siglo XXI Enoturismo y Comunicación
DO Binissalem en el siglo XXI Enoturismo y ComunicaciónDO Binissalem en el siglo XXI Enoturismo y Comunicación
DO Binissalem en el siglo XXI Enoturismo y ComunicaciónJoaquín Parra Wine UP
 
Pagine da Rassegna Stampa 24 maggio 2012[1]
Pagine da Rassegna Stampa 24 maggio 2012[1]Pagine da Rassegna Stampa 24 maggio 2012[1]
Pagine da Rassegna Stampa 24 maggio 2012[1]Marcello Braucci
 
Simplified Workload Migration to Big Data Warehouse
Simplified Workload Migration to Big Data WarehouseSimplified Workload Migration to Big Data Warehouse
Simplified Workload Migration to Big Data WarehouseAtul Sharma
 
Cau Chuyen Cho San
Cau Chuyen Cho SanCau Chuyen Cho San
Cau Chuyen Cho Santhelamgroup
 
Hybrid & Logical Data Warehouse
Hybrid & Logical Data WarehouseHybrid & Logical Data Warehouse
Hybrid & Logical Data WarehouseHeungsoon Yang
 
Keynote #2 applying behavioural insights to public policy by Rory Gallagher
Keynote #2 applying behavioural insights to public policy by Rory GallagherKeynote #2 applying behavioural insights to public policy by Rory Gallagher
Keynote #2 applying behavioural insights to public policy by Rory Gallagherux singapore
 
Key terms magazine covers
Key terms  magazine coversKey terms  magazine covers
Key terms magazine coversfeelgoodinc2024
 

Destacado (15)

E-ticaret ve Girişimcilik
E-ticaret ve GirişimcilikE-ticaret ve Girişimcilik
E-ticaret ve Girişimcilik
 
DO Binissalem en el siglo XXI Enoturismo y Comunicación
DO Binissalem en el siglo XXI Enoturismo y ComunicaciónDO Binissalem en el siglo XXI Enoturismo y Comunicación
DO Binissalem en el siglo XXI Enoturismo y Comunicación
 
Pagine da Rassegna Stampa 24 maggio 2012[1]
Pagine da Rassegna Stampa 24 maggio 2012[1]Pagine da Rassegna Stampa 24 maggio 2012[1]
Pagine da Rassegna Stampa 24 maggio 2012[1]
 
Fórmula 19
Fórmula 19Fórmula 19
Fórmula 19
 
Simplified Workload Migration to Big Data Warehouse
Simplified Workload Migration to Big Data WarehouseSimplified Workload Migration to Big Data Warehouse
Simplified Workload Migration to Big Data Warehouse
 
Formula 2!!!
Formula 2!!!Formula 2!!!
Formula 2!!!
 
Hoyosi
HoyosiHoyosi
Hoyosi
 
Flipping the classroom
Flipping the classroomFlipping the classroom
Flipping the classroom
 
Adriana dunn JUSTIN
Adriana dunn JUSTINAdriana dunn JUSTIN
Adriana dunn JUSTIN
 
Cau Chuyen Cho San
Cau Chuyen Cho SanCau Chuyen Cho San
Cau Chuyen Cho San
 
Anders celsius
Anders celsiusAnders celsius
Anders celsius
 
Amizade
AmizadeAmizade
Amizade
 
Hybrid & Logical Data Warehouse
Hybrid & Logical Data WarehouseHybrid & Logical Data Warehouse
Hybrid & Logical Data Warehouse
 
Keynote #2 applying behavioural insights to public policy by Rory Gallagher
Keynote #2 applying behavioural insights to public policy by Rory GallagherKeynote #2 applying behavioural insights to public policy by Rory Gallagher
Keynote #2 applying behavioural insights to public policy by Rory Gallagher
 
Key terms magazine covers
Key terms  magazine coversKey terms  magazine covers
Key terms magazine covers
 

Similar a Dev traning 2016 intro to the web

Webapp security testing
Webapp security testingWebapp security testing
Webapp security testingTomas Doran
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testingTomas Doran
 
Embracing HTTP in the era of API’s
Embracing HTTP in the era of API’sEmbracing HTTP in the era of API’s
Embracing HTTP in the era of API’sVisug
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developersMario Cardinal
 
Secureyourrestapi 140530183606-phpapp02
Secureyourrestapi 140530183606-phpapp02Secureyourrestapi 140530183606-phpapp02
Secureyourrestapi 140530183606-phpapp02Subhajit Bhuiya
 
Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Stormpath
 
Java EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanJava EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanAlex Theedom
 
Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеSQALab
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourSoroush Dalili
 
Ch 3: Web Application Technologies
Ch 3: Web Application TechnologiesCh 3: Web Application Technologies
Ch 3: Web Application TechnologiesSam Bowne
 
E gov security_tut_session_4_lab
E gov security_tut_session_4_labE gov security_tut_session_4_lab
E gov security_tut_session_4_labMustafa Jarrar
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesBrent Shaffer
 
SCWCD : The web client model : CHAP : 1
SCWCD  : The web client model : CHAP : 1SCWCD  : The web client model : CHAP : 1
SCWCD : The web client model : CHAP : 1Ben Abdallah Helmi
 
The never-ending REST API design debate
The never-ending REST API design debateThe never-ending REST API design debate
The never-ending REST API design debateRestlet
 
Amazon Web Service - Basics
Amazon Web Service - BasicsAmazon Web Service - Basics
Amazon Web Service - BasicsSang-Min Park
 
CNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesSam Bowne
 

Similar a Dev traning 2016 intro to the web (20)

Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
 
Embracing HTTP in the era of API’s
Embracing HTTP in the era of API’sEmbracing HTTP in the era of API’s
Embracing HTTP in the era of API’s
 
Doing REST Right
Doing REST RightDoing REST Right
Doing REST Right
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
 
Secureyourrestapi 140530183606-phpapp02
Secureyourrestapi 140530183606-phpapp02Secureyourrestapi 140530183606-phpapp02
Secureyourrestapi 140530183606-phpapp02
 
Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)
 
Java EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanJava EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 Mean
 
SCWCD : The web client model
SCWCD : The web client modelSCWCD : The web client model
SCWCD : The web client model
 
Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружение
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
 
Ch 3: Web Application Technologies
Ch 3: Web Application TechnologiesCh 3: Web Application Technologies
Ch 3: Web Application Technologies
 
E gov security_tut_session_4_lab
E gov security_tut_session_4_labE gov security_tut_session_4_lab
E gov security_tut_session_4_lab
 
Web technology Unit-I Part D - message format
Web technology Unit-I  Part D - message formatWeb technology Unit-I  Part D - message format
Web technology Unit-I Part D - message format
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our Lives
 
SCWCD : The web client model : CHAP : 1
SCWCD  : The web client model : CHAP : 1SCWCD  : The web client model : CHAP : 1
SCWCD : The web client model : CHAP : 1
 
The never-ending REST API design debate
The never-ending REST API design debateThe never-ending REST API design debate
The never-ending REST API design debate
 
Amazon Web Service - Basics
Amazon Web Service - BasicsAmazon Web Service - Basics
Amazon Web Service - Basics
 
Session,cookies and get and post methods
Session,cookies  and get and post methodsSession,cookies  and get and post methods
Session,cookies and get and post methods
 
CNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application Technologies
 

Último

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 

Último (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 

Dev traning 2016 intro to the web

  • 1. Intro to the WWW SACHEEN DHANJIE
  • 3. So you want to learn how to code? • Coding takes time, practice and patience. • Don’t give up, there’s always a solution. • Think logically.
  • 4. Hyper Text Transfer Protocol• <protocol>://<subdomain><server><port:80><path> • sacheen.plex.com:32400/web/index.html • Request / Response • Client initiate’s a request • Server generates a response • HTTP is stateless • Server /Client does not keep record of the connection
  • 6. Request/Response • Each Request contains information: • The HOST: www.google.com • The COOKIES: This may contain a session that the server can use to identify you - because http is stateless • The CONTENT: what kind information you sending the server • The METHOD that the server needs to perform, GET,PUT,POST,DELETE • There are other parameters sent to the server, but the above covers the basics
  • 8. Request/Response • Each Response contains information: • The STATUS: the code that determines the success or failure of a request, • 200, 500, 404, 503, 301, 302…etc • The CONTENT: The data sent back by the server • There is more information sent back, but the above is the the most important
  • 9. GET • Get data from the server POST • Update/Create data on the server, most developers use POST as creation as well PUT • Create/Update data on the server DELETE • DELETE’s data from the server HEAD • Identical to GET except that the server MUST NOT return a message-body in the response. OPTIONS • Represents a request for information about the communication options available on the request/response chain identified
  • 10. GET • Request • URL: https://www.afrihost.com/ • Content: none • Response: • CONTENT: the page you requested • STATUS: 200
  • 11. POST • Request • URL: https://www.afrihost.com/testimonial • Content: name=bob&age=5&message=amazing site • Response: • CONTENT: some success page • STATUS: 200
  • 12. PUT • Request • URL: https://www.afrihost.com/testimonial • Content: name=bob&age=5&message=amazing site • Response: • CONTENT: some success page • STATUS: 200
  • 13. DELETE • Request • URL: https://www.afrihost.com/testimonial/100 • Content: id=100 [the spec does not forbid or discourage it] • Response: • CONTENT: some delete success page • STATUS: 200
  • 14. Examples POST /en/api/of/telkom-lines-speed HTTP/1.1 Host: clientzone.trunk Cache-Control: no-cache Postman-Token: 4977bd45-aea9-c84b-4b15-94e909fd7e76Content- Type: multipart/form-data; boundary=---- WebKitFormBoundary7MA4YWxkTrZu0gW---- WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="number"0119185642---- WebKitFormBoundary7MA4YWxkTrZu0gW
  • 15. Examples PUT /en/api/of/telkom-lines-speed HTTP/1.1 Host: clientzone.trunk Cache-Control: no-cache Postman-Token: 2719f53b-8f52-3318-f154-ccf9adc224f2Content- Type: multipart/form-data; boundary=---- WebKitFormBoundary7MA4YWxkTrZu0gW---- WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="number"0119185642---- WebKitFormBoundary7MA4YWxkTrZu0gW
  • 16. Examples GET /en/api/of/dsl-lines-products HTTP/1.1 Host: clientzone.trunk Cache-Control: no-cache Postman-Token: 28c6208a-25ba-8fb2-8678-d0b4871fc2bc
  • 17. Accessing data in PHP • $_GET[“data”]; //somepage.com/?data=steve • $_POST[“data”] somepage.com/some-path Content: data=steve • parse_str(file_get_contents('php://input'), $put) put data is sent via stdin $put[“data”]
  • 18. Examples Afrihost Usage Example: • https://clientzone.afrihost.com/order/#/ • Afrihost Mobile App
  • 19. Closing • The request-response conversation is the fundamental process that drives all communication on the web. • Regardless of the language you use, the type of application you build (web, mobile, JSON API) or the development philosophy you follow, the end goal of an application is always to understand each request and create and return the appropriate response • KISS – KEEP IT SIMPLE STUPID – don’t over complicate things • Do one thing and do it well
  • 20. Links • https://en.wikipedia.org/wiki/List_of_HTTP_status_codes • http://symfony.com/doc/current/book/http_fundamentals.html • http://stackoverflow.com/questions/671118/what-exactly-is-restful- programming • https://packagist.org/packages/sacheen/rest-hook-bundle • http://php.net/manual/en/features.file-upload.put-method.php