SlideShare ist ein Scribd-Unternehmen logo
1 von 53
Downloaden Sie, um offline zu lesen
REST in pieces
Semiserious comparison of modern approaches
~$ whoami ↩
Paolo “Stick” Pustorino
#stickgrinder (almost everywhere)
CEO / COO @ SparkFabrik Srl
DRUMMER @ A couple of metal bands m/_
WIZARD @ Cormyr’s Royal Court
FATHER @ Casamia
ANCHE @ Basta
~$ ls -alh ↩
What makes a great API
Which tools are available
Use-cases showdown
~$ iostat ↩
Completeness
Fairness
Experience
Substance
Openness
Lolcatz
*****
*****
*****
*****
*****
*****
A cut above the
REST
What makes you API really stand out?
(from my perspective)
~$ curl -i -X GET https://stick.says/api-rules/1 ↩
URI should be nouns, not verbs
Verbs are already hard-coded in HTTP (GET, POST, …) so help yourself with
sensible semantics.
/cars
/users
/books/{id}
/getAllCars
/userRemove
/books/{id}/remove
~$ curl -i -X GET https://stick.says/api-rules/2 ↩
Never alter the state by GETs
We are not talking quantum physics, so you can observe things without changing their status!
HTTP supports state-alteration verbs. Use ‘em!
POST /cars
DELETE /users/{uid}
PUT /books/{id}
GET /addCar
GET /userRemove
GET /books/{id}/update
~$ curl -i -X GET https://stick.says/api-rules/3 ↩
Don’t mix plurals and singulars
Don’t try to exaggerate semantics expressivity, keep things simple and use plurals.
GET /users
DELETE /users/{id}
POST /users/{id}/reviews
GET /users
(right but inconsistent with the following)
DELETE /user/{id}
POST /user/{id}/review
~$ curl -i -X GET https://stick.says/api-rules/4 ↩
Use sub-resources as relational maps
Resource relations can be seen as ownership: hierarchical mapping helps here.
GET /users/{uid}/reviews
PUT /users/{uid}/reviews/{rid}
GET /reviews?byUser={uid}
PUT /userReviews/{rid}
~$ curl -i -X GET https://stick.says/api-rules/5 ↩
Specify formats in HTTP headers
Exchange format information in HTTP headers and leave other means alone to avoid confusion
and messing with priorities.
Content-Type : application/json
Accept : text/xml
PUT /reviews.json
GET /reviews?format=xml
~$ curl -i -X GET https://stick.says/api-rules/6 ↩
Caching is built-in HTTP
You can save traffic and help frontend applications deliver light-speed experience with HTTP
caching strategies. Server-to-server connections can benefit too.
Etag
Vary
Cache-Control
Proxy-Revalidate
max-age
(not a silver bullet)
no-cache
(implement proper invalidation instead)
~$ curl -i -X GET https://stick.says/api-rules/7 ↩
Collections should be filterable, sortable and pageable
That’s what query parameters are there for! Be creative and use powerful expressions.
GET /users?sort=-age,+name
GET /users/{uid}/reviews?rate>=3&published=1
GET /books?format=[epub,mobi]
GET /users?sortAsc=name&sortDesc=age
GET /userReviews?uid={uid}&rate>=3
GET /books?format=epub&format=mobi
~$ curl -i -X GET https://stick.says/api-rules/8 ↩
Version your API
Or kittens will die en-masse on a per-request basis!
Really, you can break outdated consumers if you don’t.
GET /v1/users?sort=-age,+name
POST api.v2.stick.says/users
GET /users?format=old
POST /users?format=2017
~$ curl -i -X GET https://stick.says/api-rules/9 ↩
Return meaningful status codes
HTTP status codes are to machines what error payloads are to humans. Use both and don’t return
meaningless 200 OK all around.
401 UNAUTHORIZED
{
"errors": [
{
"user_msg": "You shall nooot paaass!!!",
"internal_msg": "Balrogs are not welcome",
"code": 666,
“info": "http://stick.says/docs/v1/errors/666"
}
]
}
200 OK
{
“status” : “error”,
"user_msg": "You shall nooot paaass!!!",
"internal_msg": "Balrogs are not welcome",
"code": 666,
“info": "http://stick.says/docs/v1/errors/666"
}
~$ curl -i -X GET https://stick.says/api-rules/10 ↩
Support modern authorization methods
Allow apps and services to act on behalf of users with clear scopes and tough security. Remember
authentication and authorization are not the same!
Oauth2
JWT-Tokens
Client credentials
Basic-Auth (acceptable for S2S)
Session handling
REST
assured
Which options are available?
The Drupal way
~$ cat DRUPAL_WAY.txt | grep “pros” ↩
Drupal is finally PHP
REST is almost built-in (REST UI module helps if you like admin UIs)
Pervasive HATEOAS support via HAL
Leverages Symfony’s HTTP exceptions
Resource editing backend comes free
Views are natively RESTful
~$ cat DRUPAL_WAY.txt | grep “cons” ↩
Role-based permissions are not handled by middleware (@FIXME)
No PUTs, just PATCHes (really…)
Can’t do without HATEOAS / HAL (bloated output)
Its endpoint mapping is not ideal
RESTful Views are naive
Heavy bootstrap times
Still hard to integrate continuously
Full-stack frameworks
~$ cat FULLSTACK_FW.txt | grep “pros” ↩
Tailored persistence layer
Complex logic is often easy to implement
Small footprint
Easier multi-environment workflow (you only depend on code)
Continuous integration is a gas
Great cross-framework packages and extensions
~$ cat FULLSTACK_FW.txt | grep “cons” ↩
You may have to implement authentication by yourself
No built-in backoffice for resource management
You have to write all by yourself (even CRUD)
Boilerplate / redundant code across projects
Codebase policies / opinionation is often up to you
~$ cat FULLSTACK_FW.txt | grep “opts” ↩
Laravel / Lumen
Symfony 2/3 / Silex
Lithium (yes, still a good option if you don’t mind getting your hands dirty)
Slim and the like
Dedicated frameworks
~$ cat DEDICATED_FW.txt | grep “pros” ↩
All the pros of full-stack frameworks
Highly opinionated approach
Out-of-the-box support for most REST-related aspects (auth/auth, status-code
mapping, rate-limiting, versioning, format negotiation, etc)
Automatic API documentation generation
~$ cat DEDICATED_FW.txt | grep “cons” ↩
Smaller userbase / community
Few contribution, rely heavily on the shoulder of single maintainers
Risk to end up drowned in a fish bowl
* not that true for Dingo and not that issue for PHP Platform
~$ cat DEDICATED_FW.txt | grep “opts” ↩
API Platform
Dingo API (awesome package for Laravel and Lumen)
Epiphany
Recess PHP
API generation platforms
~$ cat API_PLATFORMS.txt | grep “pros” ↩
Make creating basic (and complex) APIs a breeze
Accessible to non-developers (or better said, frontend developers)
Make you focus on frontend application
Provide basic content management features
Generates API documentation
Pretty easy to scale with native cloud-oriented mindset
(often) Generates client SDKs (even for a number of platforms)
~$ cat API_PLATFORMS.txt | grep “cons” ↩
Logic is in configuration, not code (much like Drupal)
Smaller communities than Drupal
Higher vendor lock-in
Hard to use in team (not friendly to multi-environment workflows)
Suboptimal deployment to production
Rely on older PHP/FW versions
~$ cat API_PLATFORMS.txt | grep “opts” ↩
DreamFactory API Automation Platform (written in Laravel)
Zend Apigility
FRAPI
deployd (it’s node.js, not PHP, but it’s really good!)
put yourself to
REST
What to chose for you next API?
~$ diff use_cases..drupal_8 ↩
Use Drupal 8 when...
You are exposing actual content via REST API
Your business logic is already on Drupal and REST becomes a necessary addition
Some specific feature of Drupal, unrelated to REST makes it the best candidate for
your project (and you can bear with the… rest, er…)
~$ diff use_cases..fullstack_fw ↩
Use a full-stack framework when...
You need fluid teamwork, multi-env workflow, fast testing, etc.
You want hassle-free Continuous Integration and Deploy
Your application has lot of custom functions aside “editorial” content management
You want to swim in the ocean, not a bathtub
You must provide enterprise-class support on the long term
~$ diff use_cases..dedicated_fw ↩
Use a dedicated framework when...
You want to speed up development, leveraging good boilerplate code
You want hassle-free Continuous Integration and Deploy
Your application is bound to remain a REST API
You don’t mind getting your hand dirty (smaller community)
You can afford supporting yourself on the long term (yes, even forking the framework)
~$ diff use_cases..api_platforms ↩
Use an API platform when...
You want to speed up development, leveraging easy low-coding tools
Your focus is on thick frontend application
You are akin to pay for managed cloud services
Heavy teamwork on the backend is not in sight
You don’t mind locking to vendors
give it a
REST!
Enough blah blah blah...
Wanna chat?
THANKS
[drupalday2017] - REST in pieces

Weitere ähnliche Inhalte

Was ist angesagt?

Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend developmentsparkfabrik
 
Getting started with Catalyst and extjs
Getting started with Catalyst and extjsGetting started with Catalyst and extjs
Getting started with Catalyst and extjsPeter Edwards
 
Composer and deployer for enterprise
Composer and deployer for enterpriseComposer and deployer for enterprise
Composer and deployer for enterpriseElena Pustovoit
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php PresentationAlan Pinstein
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalPantheon
 
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radioAncient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radioCristopher Ewing
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and DrushPantheon
 
PHP in one presentation
PHP in one presentationPHP in one presentation
PHP in one presentationMilad Rahimi
 
Scalable web application architecture
Scalable web application architectureScalable web application architecture
Scalable web application architecturepostrational
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Clark Everetts
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentsparkfabrik
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPressTaylor Lovett
 
Andrew Mykhaliuk - Sorry, I need to make a build for frontend
Andrew Mykhaliuk - Sorry, I need to make a build for frontendAndrew Mykhaliuk - Sorry, I need to make a build for frontend
Andrew Mykhaliuk - Sorry, I need to make a build for frontendOdessaJS Conf
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flaskjuzten
 
New EEA Plone Add-ons
New EEA Plone Add-onsNew EEA Plone Add-ons
New EEA Plone Add-onsAlin Voinea
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Pantheon
 
Web Development in Perl
Web Development in PerlWeb Development in Perl
Web Development in PerlNaveen Gupta
 
Devel for Drupal 8
Devel for Drupal 8Devel for Drupal 8
Devel for Drupal 8Luca Lusso
 
Creating a Plug-In Architecture
Creating a Plug-In ArchitectureCreating a Plug-In Architecture
Creating a Plug-In Architectureondrejbalas
 

Was ist angesagt? (20)

Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
 
Getting started with Catalyst and extjs
Getting started with Catalyst and extjsGetting started with Catalyst and extjs
Getting started with Catalyst and extjs
 
Composer and deployer for enterprise
Composer and deployer for enterpriseComposer and deployer for enterprise
Composer and deployer for enterprise
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
 
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radioAncient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
 
Using Composer with Drupal and Drush
Using Composer with Drupal and DrushUsing Composer with Drupal and Drush
Using Composer with Drupal and Drush
 
PHP in one presentation
PHP in one presentationPHP in one presentation
PHP in one presentation
 
Scalable web application architecture
Scalable web application architectureScalable web application architecture
Scalable web application architecture
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend development
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPress
 
Andrew Mykhaliuk - Sorry, I need to make a build for frontend
Andrew Mykhaliuk - Sorry, I need to make a build for frontendAndrew Mykhaliuk - Sorry, I need to make a build for frontend
Andrew Mykhaliuk - Sorry, I need to make a build for frontend
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flask
 
New EEA Plone Add-ons
New EEA Plone Add-onsNew EEA Plone Add-ons
New EEA Plone Add-ons
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
 
Web Development in Perl
Web Development in PerlWeb Development in Perl
Web Development in Perl
 
CloudKit as a backend
CloudKit as a backendCloudKit as a backend
CloudKit as a backend
 
Devel for Drupal 8
Devel for Drupal 8Devel for Drupal 8
Devel for Drupal 8
 
Creating a Plug-In Architecture
Creating a Plug-In ArchitectureCreating a Plug-In Architecture
Creating a Plug-In Architecture
 

Andere mochten auch

[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.DrupalDay
 
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...DrupalDay
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8DrupalDay
 
[drupalday2017] - Behat per Drupal: test automatici e molto di più
[drupalday2017] - Behat per Drupal: test automatici e molto di più[drupalday2017] - Behat per Drupal: test automatici e molto di più
[drupalday2017] - Behat per Drupal: test automatici e molto di piùDrupalDay
 
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...DrupalDay
 
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client ManagerDrupalDay
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8DrupalDay
 
[drupalday2017] - Async navigation with a lightweight ES6 framework
[drupalday2017] - Async navigation with a lightweight ES6 framework[drupalday2017] - Async navigation with a lightweight ES6 framework
[drupalday2017] - Async navigation with a lightweight ES6 frameworkDrupalDay
 
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al themingDrupalDay
 
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a timeDrupalDay
 
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...DrupalDay
 
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di SapienzaDrupalDay
 
[drupalday2017] - Drupal 4 Stakeholders
[drupalday2017] - Drupal 4 Stakeholders[drupalday2017] - Drupal 4 Stakeholders
[drupalday2017] - Drupal 4 StakeholdersDrupalDay
 
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5DrupalDay
 
[drupalday2017] - Venezia & Drupal. Venezia è Drupal!
[drupalday2017] - Venezia & Drupal. Venezia è Drupal![drupalday2017] - Venezia & Drupal. Venezia è Drupal!
[drupalday2017] - Venezia & Drupal. Venezia è Drupal!DrupalDay
 
[drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance![drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance!DrupalDay
 
[drupalday2017] - Quando l’informazione è un servizio
[drupalday2017] - Quando l’informazione è un servizio[drupalday2017] - Quando l’informazione è un servizio
[drupalday2017] - Quando l’informazione è un servizioDrupalDay
 
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8DrupalDay
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your CodeDrupalDay
 
Da X a Drupal 8, migra tutto e vivi sereno
Da X a Drupal 8, migra tutto e vivi serenoDa X a Drupal 8, migra tutto e vivi sereno
Da X a Drupal 8, migra tutto e vivi serenoDrupalDay
 

Andere mochten auch (20)

[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
 
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
 
[drupalday2017] - Behat per Drupal: test automatici e molto di più
[drupalday2017] - Behat per Drupal: test automatici e molto di più[drupalday2017] - Behat per Drupal: test automatici e molto di più
[drupalday2017] - Behat per Drupal: test automatici e molto di più
 
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
 
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
 
[drupalday2017] - Async navigation with a lightweight ES6 framework
[drupalday2017] - Async navigation with a lightweight ES6 framework[drupalday2017] - Async navigation with a lightweight ES6 framework
[drupalday2017] - Async navigation with a lightweight ES6 framework
 
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
 
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
 
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
 
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
 
[drupalday2017] - Drupal 4 Stakeholders
[drupalday2017] - Drupal 4 Stakeholders[drupalday2017] - Drupal 4 Stakeholders
[drupalday2017] - Drupal 4 Stakeholders
 
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
 
[drupalday2017] - Venezia & Drupal. Venezia è Drupal!
[drupalday2017] - Venezia & Drupal. Venezia è Drupal![drupalday2017] - Venezia & Drupal. Venezia è Drupal!
[drupalday2017] - Venezia & Drupal. Venezia è Drupal!
 
[drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance![drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance!
 
[drupalday2017] - Quando l’informazione è un servizio
[drupalday2017] - Quando l’informazione è un servizio[drupalday2017] - Quando l’informazione è un servizio
[drupalday2017] - Quando l’informazione è un servizio
 
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Da X a Drupal 8, migra tutto e vivi sereno
Da X a Drupal 8, migra tutto e vivi serenoDa X a Drupal 8, migra tutto e vivi sereno
Da X a Drupal 8, migra tutto e vivi sereno
 

Ähnlich wie [drupalday2017] - REST in pieces

[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?Wong Hoi Sing Edison
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developersPatrick Savalle
 
How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.DrupalCampDN
 
JOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best PracticesJOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best PracticesJordan Open Source Association
 
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
 Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data... Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...Big Data Spain
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP frameworkDinh Pham
 
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.frameworkHanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.frameworkNguyen Duc Phu
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operationsgrim_radical
 
Getting Started with the Alma API
Getting Started with the Alma APIGetting Started with the Alma API
Getting Started with the Alma APIKyle Banerjee
 
From Open Source to Open API with Restlet
From Open Source to Open API with RestletFrom Open Source to Open API with Restlet
From Open Source to Open API with RestletRestlet
 
Headless approach for offloading heavy tasks in Magento
Headless approach for offloading heavy tasks in MagentoHeadless approach for offloading heavy tasks in Magento
Headless approach for offloading heavy tasks in MagentoSander Mangel
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGabriel Lucaciu
 
mastering libcurl part 1
mastering libcurl part 1mastering libcurl part 1
mastering libcurl part 1Daniel Stenberg
 
Super simple introduction to REST-APIs (2nd version)
Super simple introduction to REST-APIs (2nd version)Super simple introduction to REST-APIs (2nd version)
Super simple introduction to REST-APIs (2nd version)Patrick Savalle
 
EXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp frameworkEXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp frameworkFlorent Georges
 

Ähnlich wie [drupalday2017] - REST in pieces (20)

Restful webservices
Restful webservicesRestful webservices
Restful webservices
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.
 
Drupal development
Drupal development Drupal development
Drupal development
 
Don't screw it up! How to build durable API
Don't screw it up! How to build durable API Don't screw it up! How to build durable API
Don't screw it up! How to build durable API
 
JOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best PracticesJOSA TechTalks - RESTful API Concepts and Best Practices
JOSA TechTalks - RESTful API Concepts and Best Practices
 
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
 Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data... Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
 
How to learn to build your own PHP framework
How to learn to build your own PHP frameworkHow to learn to build your own PHP framework
How to learn to build your own PHP framework
 
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.frameworkHanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
Hanoi php day 2008 - 01.pham cong dinh - how.to.build.your.own.framework
 
NodeJS
NodeJSNodeJS
NodeJS
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operations
 
Getting Started with the Alma API
Getting Started with the Alma APIGetting Started with the Alma API
Getting Started with the Alma API
 
From Open Source to Open API with Restlet
From Open Source to Open API with RestletFrom Open Source to Open API with Restlet
From Open Source to Open API with Restlet
 
Headless approach for offloading heavy tasks in Magento
Headless approach for offloading heavy tasks in MagentoHeadless approach for offloading heavy tasks in Magento
Headless approach for offloading heavy tasks in Magento
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress App
 
mastering libcurl part 1
mastering libcurl part 1mastering libcurl part 1
mastering libcurl part 1
 
Super simple introduction to REST-APIs (2nd version)
Super simple introduction to REST-APIs (2nd version)Super simple introduction to REST-APIs (2nd version)
Super simple introduction to REST-APIs (2nd version)
 
EXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp frameworkEXPath: the packaging system and the webapp framework
EXPath: the packaging system and the webapp framework
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 

Mehr von DrupalDay

Once you go cloud you never go down
Once you go cloud you never go downOnce you go cloud you never go down
Once you go cloud you never go downDrupalDay
 
Tooling per il tema in Drupal 8
Tooling per il tema in Drupal 8Tooling per il tema in Drupal 8
Tooling per il tema in Drupal 8DrupalDay
 
Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8DrupalDay
 
Drupal per la PA
Drupal per la PADrupal per la PA
Drupal per la PADrupalDay
 
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case study
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case studyMantenere una distribuzione Drupal attraverso test coverage: Paddle case study
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case studyDrupalDay
 
Invisiblefarm condivide l'esperienza DrupalGIS
Invisiblefarm condivide l'esperienza DrupalGISInvisiblefarm condivide l'esperienza DrupalGIS
Invisiblefarm condivide l'esperienza DrupalGISDrupalDay
 
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.euLa semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.euDrupalDay
 
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen..."Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...DrupalDay
 
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...DrupalDay
 

Mehr von DrupalDay (9)

Once you go cloud you never go down
Once you go cloud you never go downOnce you go cloud you never go down
Once you go cloud you never go down
 
Tooling per il tema in Drupal 8
Tooling per il tema in Drupal 8Tooling per il tema in Drupal 8
Tooling per il tema in Drupal 8
 
Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8
 
Drupal per la PA
Drupal per la PADrupal per la PA
Drupal per la PA
 
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case study
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case studyMantenere una distribuzione Drupal attraverso test coverage: Paddle case study
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case study
 
Invisiblefarm condivide l'esperienza DrupalGIS
Invisiblefarm condivide l'esperienza DrupalGISInvisiblefarm condivide l'esperienza DrupalGIS
Invisiblefarm condivide l'esperienza DrupalGIS
 
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.euLa semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
 
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen..."Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
 
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Kürzlich hochgeladen (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

[drupalday2017] - REST in pieces

  • 1.
  • 2. REST in pieces Semiserious comparison of modern approaches
  • 3. ~$ whoami ↩ Paolo “Stick” Pustorino #stickgrinder (almost everywhere) CEO / COO @ SparkFabrik Srl DRUMMER @ A couple of metal bands m/_ WIZARD @ Cormyr’s Royal Court FATHER @ Casamia ANCHE @ Basta
  • 4. ~$ ls -alh ↩ What makes a great API Which tools are available Use-cases showdown
  • 6.
  • 7.
  • 8. A cut above the REST What makes you API really stand out? (from my perspective)
  • 9. ~$ curl -i -X GET https://stick.says/api-rules/1 ↩ URI should be nouns, not verbs Verbs are already hard-coded in HTTP (GET, POST, …) so help yourself with sensible semantics.
  • 11. ~$ curl -i -X GET https://stick.says/api-rules/2 ↩ Never alter the state by GETs We are not talking quantum physics, so you can observe things without changing their status! HTTP supports state-alteration verbs. Use ‘em!
  • 12. POST /cars DELETE /users/{uid} PUT /books/{id} GET /addCar GET /userRemove GET /books/{id}/update
  • 13. ~$ curl -i -X GET https://stick.says/api-rules/3 ↩ Don’t mix plurals and singulars Don’t try to exaggerate semantics expressivity, keep things simple and use plurals.
  • 14. GET /users DELETE /users/{id} POST /users/{id}/reviews GET /users (right but inconsistent with the following) DELETE /user/{id} POST /user/{id}/review
  • 15. ~$ curl -i -X GET https://stick.says/api-rules/4 ↩ Use sub-resources as relational maps Resource relations can be seen as ownership: hierarchical mapping helps here.
  • 16. GET /users/{uid}/reviews PUT /users/{uid}/reviews/{rid} GET /reviews?byUser={uid} PUT /userReviews/{rid}
  • 17. ~$ curl -i -X GET https://stick.says/api-rules/5 ↩ Specify formats in HTTP headers Exchange format information in HTTP headers and leave other means alone to avoid confusion and messing with priorities.
  • 18. Content-Type : application/json Accept : text/xml PUT /reviews.json GET /reviews?format=xml
  • 19. ~$ curl -i -X GET https://stick.says/api-rules/6 ↩ Caching is built-in HTTP You can save traffic and help frontend applications deliver light-speed experience with HTTP caching strategies. Server-to-server connections can benefit too.
  • 20. Etag Vary Cache-Control Proxy-Revalidate max-age (not a silver bullet) no-cache (implement proper invalidation instead)
  • 21. ~$ curl -i -X GET https://stick.says/api-rules/7 ↩ Collections should be filterable, sortable and pageable That’s what query parameters are there for! Be creative and use powerful expressions.
  • 22. GET /users?sort=-age,+name GET /users/{uid}/reviews?rate>=3&published=1 GET /books?format=[epub,mobi] GET /users?sortAsc=name&sortDesc=age GET /userReviews?uid={uid}&rate>=3 GET /books?format=epub&format=mobi
  • 23. ~$ curl -i -X GET https://stick.says/api-rules/8 ↩ Version your API Or kittens will die en-masse on a per-request basis! Really, you can break outdated consumers if you don’t.
  • 24. GET /v1/users?sort=-age,+name POST api.v2.stick.says/users GET /users?format=old POST /users?format=2017
  • 25. ~$ curl -i -X GET https://stick.says/api-rules/9 ↩ Return meaningful status codes HTTP status codes are to machines what error payloads are to humans. Use both and don’t return meaningless 200 OK all around.
  • 26. 401 UNAUTHORIZED { "errors": [ { "user_msg": "You shall nooot paaass!!!", "internal_msg": "Balrogs are not welcome", "code": 666, “info": "http://stick.says/docs/v1/errors/666" } ] } 200 OK { “status” : “error”, "user_msg": "You shall nooot paaass!!!", "internal_msg": "Balrogs are not welcome", "code": 666, “info": "http://stick.says/docs/v1/errors/666" }
  • 27. ~$ curl -i -X GET https://stick.says/api-rules/10 ↩ Support modern authorization methods Allow apps and services to act on behalf of users with clear scopes and tough security. Remember authentication and authorization are not the same!
  • 31. ~$ cat DRUPAL_WAY.txt | grep “pros” ↩ Drupal is finally PHP REST is almost built-in (REST UI module helps if you like admin UIs) Pervasive HATEOAS support via HAL Leverages Symfony’s HTTP exceptions Resource editing backend comes free Views are natively RESTful
  • 32. ~$ cat DRUPAL_WAY.txt | grep “cons” ↩ Role-based permissions are not handled by middleware (@FIXME) No PUTs, just PATCHes (really…) Can’t do without HATEOAS / HAL (bloated output) Its endpoint mapping is not ideal RESTful Views are naive Heavy bootstrap times Still hard to integrate continuously
  • 34. ~$ cat FULLSTACK_FW.txt | grep “pros” ↩ Tailored persistence layer Complex logic is often easy to implement Small footprint Easier multi-environment workflow (you only depend on code) Continuous integration is a gas Great cross-framework packages and extensions
  • 35. ~$ cat FULLSTACK_FW.txt | grep “cons” ↩ You may have to implement authentication by yourself No built-in backoffice for resource management You have to write all by yourself (even CRUD) Boilerplate / redundant code across projects Codebase policies / opinionation is often up to you
  • 36. ~$ cat FULLSTACK_FW.txt | grep “opts” ↩ Laravel / Lumen Symfony 2/3 / Silex Lithium (yes, still a good option if you don’t mind getting your hands dirty) Slim and the like
  • 38. ~$ cat DEDICATED_FW.txt | grep “pros” ↩ All the pros of full-stack frameworks Highly opinionated approach Out-of-the-box support for most REST-related aspects (auth/auth, status-code mapping, rate-limiting, versioning, format negotiation, etc) Automatic API documentation generation
  • 39. ~$ cat DEDICATED_FW.txt | grep “cons” ↩ Smaller userbase / community Few contribution, rely heavily on the shoulder of single maintainers Risk to end up drowned in a fish bowl * not that true for Dingo and not that issue for PHP Platform
  • 40. ~$ cat DEDICATED_FW.txt | grep “opts” ↩ API Platform Dingo API (awesome package for Laravel and Lumen) Epiphany Recess PHP
  • 42. ~$ cat API_PLATFORMS.txt | grep “pros” ↩ Make creating basic (and complex) APIs a breeze Accessible to non-developers (or better said, frontend developers) Make you focus on frontend application Provide basic content management features Generates API documentation Pretty easy to scale with native cloud-oriented mindset (often) Generates client SDKs (even for a number of platforms)
  • 43. ~$ cat API_PLATFORMS.txt | grep “cons” ↩ Logic is in configuration, not code (much like Drupal) Smaller communities than Drupal Higher vendor lock-in Hard to use in team (not friendly to multi-environment workflows) Suboptimal deployment to production Rely on older PHP/FW versions
  • 44. ~$ cat API_PLATFORMS.txt | grep “opts” ↩ DreamFactory API Automation Platform (written in Laravel) Zend Apigility FRAPI deployd (it’s node.js, not PHP, but it’s really good!)
  • 45. put yourself to REST What to chose for you next API?
  • 46. ~$ diff use_cases..drupal_8 ↩ Use Drupal 8 when... You are exposing actual content via REST API Your business logic is already on Drupal and REST becomes a necessary addition Some specific feature of Drupal, unrelated to REST makes it the best candidate for your project (and you can bear with the… rest, er…)
  • 47. ~$ diff use_cases..fullstack_fw ↩ Use a full-stack framework when... You need fluid teamwork, multi-env workflow, fast testing, etc. You want hassle-free Continuous Integration and Deploy Your application has lot of custom functions aside “editorial” content management You want to swim in the ocean, not a bathtub You must provide enterprise-class support on the long term
  • 48. ~$ diff use_cases..dedicated_fw ↩ Use a dedicated framework when... You want to speed up development, leveraging good boilerplate code You want hassle-free Continuous Integration and Deploy Your application is bound to remain a REST API You don’t mind getting your hand dirty (smaller community) You can afford supporting yourself on the long term (yes, even forking the framework)
  • 49. ~$ diff use_cases..api_platforms ↩ Use an API platform when... You want to speed up development, leveraging easy low-coding tools Your focus is on thick frontend application You are akin to pay for managed cloud services Heavy teamwork on the backend is not in sight You don’t mind locking to vendors
  • 50. give it a REST! Enough blah blah blah...