11. Well, there’s a solution!
Let’s just kill the Drupal frontend. What’s left?
HEADLESS DRUPAL
13. But wait - there’s a (headless) REST
● Representational State Transfer - WTF?
● Architecture style for designing networked
applications - ok!
● Request <=> Response Communication
between Client and Server - ah!
14. So what about Headless Drupal?
Request
Response
Drupal Backend Fancy Frontend
DECOUPLED!
15. So what about Headless Drupal?
Drupal Backend
TARGETED / TAILORED!
Frontend / App 1
Frontend / App 2
19. Example: Response (JSON)
Request: GET node/1 + Accept: application/json
{"nid":[{"value":"1"}],"uuid":[{"value":"e1d6bb85-f100-41cb-a500-a4194607fced"}],"vid":[{"value":"1"}],"type":[{"target_id":"
artist"}],"langcode":[{"value":"en"}],"title":[{"value":"Genesis"}],"uid":[{"target_id":"1"}],"status":[{"value":"1"}],"created":
[{"value":"1414606204"}],"changed":[{"value":"1414754666"}],"promote":[{"value":"0"}],"sticky":[{"value":"0"}],"
revision_timestamp":[{"value":"1414606230"}],"revision_uid":[{"target_id":"1"}],"revision_log":[{"value":""}],"path":[{"alias":
null,"pid":null}],"field_description":[{"value":"Genesis are a British rock band formed in 1967. The band has consisted of
its three longest-tenured members: founding members Tony Banks (keyboards) and Mike Rutherford (bass, guitar); and
Phil Collins (vocals, drums). Former members Peter Gabriel (vocals, flute), Steve Hackett (guitar) and Anthony Phillips
(guitar) also played major roles in the band in its early years. Genesis are among the highest-selling recording artists of
all time with approximately 130 million albums sold worldwide.[1] They were inducted into the Rock and Roll Hall of
Fame in 2010.","format":"plain_text"}],"field_image":[{"target_id":null,"display":null,"description":null,"alt":null, "title":null,"
width":null,"height":null}],"field_style":[{"target_id":"1"}]}
Drupal Core serves complete entities as JSON response!
20. Drupal 8 REST request methods
GET get entity
POST add entity
PATCH change entity (complete or partial)
DELETE remove entity
Entities might be nodes, comments, users, roles, terms, menus, blocks, files,
views, image styles, shortcuts, display modes, form modes, text formats, ....
34. Benefits of Headless Drupal
● Decoupling / Separation of concerns
● Content-centric thinking
● State of the art frontend + sustainable backend
● Suitable technologies for different targets
● Flexibility choosing backend / frontend
● Sustainable interface (API)
● Performance / Scalability
(of course we won’t ever change the backend, do we?)
35. Topics to take care about
● Services not available
● Security
● Accessibility
● SEO
36. Leave all the toys
to the frontend boys
(and girls) ?