SlideShare a Scribd company logo
1 of 15
ReST (Introduction)


 3rd Meetup PHP Indonesia

         6 April 2013
          Surabaya



       by Glend Maatita
ReST example (Twitter)
ReST example (Facebook)
ReST - History

●   Representational State Transfer


●   ReST was re-DISCOVER-ed by Roy Fielding


●   Doesnt require any external library


●   Tightly bond with HTTP
ReST – HTTP
Client Send Request           Server Send Response




GET / HTTP/1.1
Host: xkcd.com            HTTP/1.1 200 OK
Accept: text/html         Date: Sat, 02 Apr 2011 21:05:05 GMT
User-Agent: Mozilla/5.0   Server: lighttpd/1.4.19
(Macintosh)
                          Content-Type: text/html
                          <html>...</html>
ReST - HTTP
    HTTP Verb
●   GET
●   POST
●   PUT
●   DELETE


    Routes
●   URL + HTTP Verb
ReST - Definition


“The Same Thing with a different STATE
changes its meaning”


“The message is changed based on it's
State”
ReST – How To
●   Loved by developer
●   Easy to read, easy to
    understand, easy to learn
ReST
Bad !!                      Imagine :)


/getAllUsers                /getMentions
/getUserById                /getUserTimeLine
/getUsers                   /getHomeTimeLine
/deleteUser                 /getStatusesRetweet
/updateUser                 /updateStatuses
/deleteUserTenYearsOld      /destroyStatus
/newUser                    /getRetweets
/getUserUnderTenYearsOld
ReST - Quotes


“Web it's not about HTML pages, it's about resources,
    and those resources are located by URLs”
So ?
● We only need two base URLs as the location of a resource
(collection of resource, and single resource)
● Resources is Noun, use Noun :)

● Plural is better




    Resource    POST          GET (READ)       PUT            DELETE
                (CREATE)                       (UPDATE)


    /users      Create new    List all Users   Update All     Delete All
                user                           Users          Users


    /users/1    -             Show User        Update User Delete User
                              (with ID = 1)    with ID = 1 (if with ID = 1
                                               Exist)
Association ?
Easy :)


GET /departments/1/users
POST /departments/1/users
PUT /users/123
DELETE /users/123
Query
Use '?' for Query


GET /users?limit=50&offset=100
GET /users?username=indra&birth=1990
GET /users?column=id,name,username,birth
GET /users.json (/users.xml)
Versioning
/v1/users/
Terima Kasih




                Glend Maatita
                  @glend_maatita
                  YM : the_entung
      glend.maatita@kampus.co.id

More Related Content

Viewers also liked

How To Make Your Day Last Longer: Time Management in Marketing Projects
How To Make Your Day Last Longer: Time Management in Marketing Projects How To Make Your Day Last Longer: Time Management in Marketing Projects
How To Make Your Day Last Longer: Time Management in Marketing Projects Alek Kowalczyk
 
Understanding the state of your web application using Apache Kafka, Spark
Understanding the state of your web application using Apache Kafka, SparkUnderstanding the state of your web application using Apache Kafka, Spark
Understanding the state of your web application using Apache Kafka, SparkExist
 
NEW WORLD COMING
NEW WORLD COMINGNEW WORLD COMING
NEW WORLD COMINGjpscheller
 
iprocurment Buyer Guide
iprocurment Buyer Guideiprocurment Buyer Guide
iprocurment Buyer GuideRazzy Jey
 
Navegadores web
Navegadores webNavegadores web
Navegadores webhanson
 
Philippine Java Industry
Philippine Java IndustryPhilippine Java Industry
Philippine Java IndustryExist
 
Rails 3
Rails 3Rails 3
Rails 3Exist
 
2010 NYC Presentation
2010 NYC Presentation2010 NYC Presentation
2010 NYC Presentationbfum316
 
N efemed gs1 standaard kosten of kansen
N efemed gs1 standaard kosten of kansenN efemed gs1 standaard kosten of kansen
N efemed gs1 standaard kosten of kansenGS1 Nederland
 
Node.js Presentation
Node.js PresentationNode.js Presentation
Node.js PresentationExist
 
How to survive and thrive in the era of free shipping
How to survive and thrive in the era of free shippingHow to survive and thrive in the era of free shipping
How to survive and thrive in the era of free shippingGoECart
 
СЕТЕВЫЕ ПРОЕКТЫ КАК СРЕДСТВА ФОРМИРОВАНИЯ ИНФОРМАЦИОННОЙ КОМПЕТЕНТНОСТИ ОБУЧА...
СЕТЕВЫЕ ПРОЕКТЫ КАК СРЕДСТВА ФОРМИРОВАНИЯ ИНФОРМАЦИОННОЙ КОМПЕТЕНТНОСТИ ОБУЧА...СЕТЕВЫЕ ПРОЕКТЫ КАК СРЕДСТВА ФОРМИРОВАНИЯ ИНФОРМАЦИОННОЙ КОМПЕТЕНТНОСТИ ОБУЧА...
СЕТЕВЫЕ ПРОЕКТЫ КАК СРЕДСТВА ФОРМИРОВАНИЯ ИНФОРМАЦИОННОЙ КОМПЕТЕНТНОСТИ ОБУЧА...Елена Денисова
 

Viewers also liked (20)

How To Make Your Day Last Longer: Time Management in Marketing Projects
How To Make Your Day Last Longer: Time Management in Marketing Projects How To Make Your Day Last Longer: Time Management in Marketing Projects
How To Make Your Day Last Longer: Time Management in Marketing Projects
 
Pharmacognosy 5th sem
Pharmacognosy 5th semPharmacognosy 5th sem
Pharmacognosy 5th sem
 
Understanding the state of your web application using Apache Kafka, Spark
Understanding the state of your web application using Apache Kafka, SparkUnderstanding the state of your web application using Apache Kafka, Spark
Understanding the state of your web application using Apache Kafka, Spark
 
NEW WORLD COMING
NEW WORLD COMINGNEW WORLD COMING
NEW WORLD COMING
 
Paycreditreport
PaycreditreportPaycreditreport
Paycreditreport
 
iprocurment Buyer Guide
iprocurment Buyer Guideiprocurment Buyer Guide
iprocurment Buyer Guide
 
Generation 3
Generation 3Generation 3
Generation 3
 
Kidnapped nt
Kidnapped ntKidnapped nt
Kidnapped nt
 
Navegadores web
Navegadores webNavegadores web
Navegadores web
 
Philippine Java Industry
Philippine Java IndustryPhilippine Java Industry
Philippine Java Industry
 
Immigration
ImmigrationImmigration
Immigration
 
Pharmacognosy 5th sem
Pharmacognosy 5th semPharmacognosy 5th sem
Pharmacognosy 5th sem
 
Exploring membership 3
Exploring membership 3Exploring membership 3
Exploring membership 3
 
Rails 3
Rails 3Rails 3
Rails 3
 
2010 NYC Presentation
2010 NYC Presentation2010 NYC Presentation
2010 NYC Presentation
 
N efemed gs1 standaard kosten of kansen
N efemed gs1 standaard kosten of kansenN efemed gs1 standaard kosten of kansen
N efemed gs1 standaard kosten of kansen
 
Node.js Presentation
Node.js PresentationNode.js Presentation
Node.js Presentation
 
How to survive and thrive in the era of free shipping
How to survive and thrive in the era of free shippingHow to survive and thrive in the era of free shipping
How to survive and thrive in the era of free shipping
 
2011 (5) mar
2011 (5) mar2011 (5) mar
2011 (5) mar
 
СЕТЕВЫЕ ПРОЕКТЫ КАК СРЕДСТВА ФОРМИРОВАНИЯ ИНФОРМАЦИОННОЙ КОМПЕТЕНТНОСТИ ОБУЧА...
СЕТЕВЫЕ ПРОЕКТЫ КАК СРЕДСТВА ФОРМИРОВАНИЯ ИНФОРМАЦИОННОЙ КОМПЕТЕНТНОСТИ ОБУЧА...СЕТЕВЫЕ ПРОЕКТЫ КАК СРЕДСТВА ФОРМИРОВАНИЯ ИНФОРМАЦИОННОЙ КОМПЕТЕНТНОСТИ ОБУЧА...
СЕТЕВЫЕ ПРОЕКТЫ КАК СРЕДСТВА ФОРМИРОВАНИЯ ИНФОРМАЦИОННОЙ КОМПЕТЕНТНОСТИ ОБУЧА...
 

Similar to PHP Indonesia 3rd meetup - 06/04/13

RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座Li Yi
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web ServiceHoan Vu Tran
 
Restful webservices
Restful webservicesRestful webservices
Restful webservicesKong King
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API07.pallav
 
rest-api-basics.pptx
rest-api-basics.pptxrest-api-basics.pptx
rest-api-basics.pptxFikiRieza2
 
Getting started with DSpace 7 REST API
Getting started with DSpace 7 REST APIGetting started with DSpace 7 REST API
Getting started with DSpace 7 REST API4Science
 
Data persistence using pouchdb and couchdb
Data persistence using pouchdb and couchdbData persistence using pouchdb and couchdb
Data persistence using pouchdb and couchdbDimgba Kalu
 
Resource-Oriented Web Services
Resource-Oriented Web ServicesResource-Oriented Web Services
Resource-Oriented Web ServicesBradley Holt
 
04 request-headers
04 request-headers04 request-headers
04 request-headerssnopteck
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuseejlp12
 
RESTful for opentravel.org by HP
RESTful for opentravel.org by HPRESTful for opentravel.org by HP
RESTful for opentravel.org by HPRoni Schuetz
 
Learn REST in 18 Slides
Learn REST in 18 SlidesLearn REST in 18 Slides
Learn REST in 18 SlidesSuraj Gupta
 
nguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-servicenguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-servicehazzaz
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 

Similar to PHP Indonesia 3rd meetup - 06/04/13 (20)

REST API Laravel
REST API LaravelREST API Laravel
REST API Laravel
 
Rest And Rails
Rest And RailsRest And Rails
Rest And Rails
 
L18 REST API Design
L18 REST API DesignL18 REST API Design
L18 REST API Design
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
 
Day02 a pi.
Day02   a pi.Day02   a pi.
Day02 a pi.
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web Service
 
Restful webservices
Restful webservicesRestful webservices
Restful webservices
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
rest-api-basics.pptx
rest-api-basics.pptxrest-api-basics.pptx
rest-api-basics.pptx
 
ROA.ppt
ROA.pptROA.ppt
ROA.ppt
 
Getting started with DSpace 7 REST API
Getting started with DSpace 7 REST APIGetting started with DSpace 7 REST API
Getting started with DSpace 7 REST API
 
Data persistence using pouchdb and couchdb
Data persistence using pouchdb and couchdbData persistence using pouchdb and couchdb
Data persistence using pouchdb and couchdb
 
Resource-Oriented Web Services
Resource-Oriented Web ServicesResource-Oriented Web Services
Resource-Oriented Web Services
 
04 request-headers
04 request-headers04 request-headers
04 request-headers
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
RESTful for opentravel.org by HP
RESTful for opentravel.org by HPRESTful for opentravel.org by HP
RESTful for opentravel.org by HP
 
Learn REST in 18 Slides
Learn REST in 18 SlidesLearn REST in 18 Slides
Learn REST in 18 Slides
 
nguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-servicenguyenhainhathuy-building-restful-web-service
nguyenhainhathuy-building-restful-web-service
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 

Recently uploaded

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

PHP Indonesia 3rd meetup - 06/04/13

  • 1. ReST (Introduction) 3rd Meetup PHP Indonesia 6 April 2013 Surabaya by Glend Maatita
  • 4. ReST - History ● Representational State Transfer ● ReST was re-DISCOVER-ed by Roy Fielding ● Doesnt require any external library ● Tightly bond with HTTP
  • 5. ReST – HTTP Client Send Request Server Send Response GET / HTTP/1.1 Host: xkcd.com HTTP/1.1 200 OK Accept: text/html Date: Sat, 02 Apr 2011 21:05:05 GMT User-Agent: Mozilla/5.0 Server: lighttpd/1.4.19 (Macintosh) Content-Type: text/html <html>...</html>
  • 6. ReST - HTTP HTTP Verb ● GET ● POST ● PUT ● DELETE Routes ● URL + HTTP Verb
  • 7. ReST - Definition “The Same Thing with a different STATE changes its meaning” “The message is changed based on it's State”
  • 8. ReST – How To ● Loved by developer ● Easy to read, easy to understand, easy to learn
  • 9. ReST Bad !! Imagine :) /getAllUsers /getMentions /getUserById /getUserTimeLine /getUsers /getHomeTimeLine /deleteUser /getStatusesRetweet /updateUser /updateStatuses /deleteUserTenYearsOld /destroyStatus /newUser /getRetweets /getUserUnderTenYearsOld
  • 10. ReST - Quotes “Web it's not about HTML pages, it's about resources, and those resources are located by URLs”
  • 11. So ? ● We only need two base URLs as the location of a resource (collection of resource, and single resource) ● Resources is Noun, use Noun :) ● Plural is better Resource POST GET (READ) PUT DELETE (CREATE) (UPDATE) /users Create new List all Users Update All Delete All user Users Users /users/1 - Show User Update User Delete User (with ID = 1) with ID = 1 (if with ID = 1 Exist)
  • 12. Association ? Easy :) GET /departments/1/users POST /departments/1/users PUT /users/123 DELETE /users/123
  • 13. Query Use '?' for Query GET /users?limit=50&offset=100 GET /users?username=indra&birth=1990 GET /users?column=id,name,username,birth GET /users.json (/users.xml)
  • 15. Terima Kasih Glend Maatita @glend_maatita YM : the_entung glend.maatita@kampus.co.id