Score:-5

Is by design, Drupal headless?

es flag

If I understood correctly, "decoupling" a content management system means separating backend from frontend (having two "modules" for each under the same "program").

If I understood correctly, "headlessing" a content management system is making it to be possible to supply content to at least two different front-end interfaces at once ("two different programs" as may appear to an end user).

I would assume that by design, Drupal is not decoupled because it does have built in JavaScript (quick edit for a node, for example) but by design is it headless?

leymannx avatar
ne flag
"_Drupal is not decoupled because it does have built in JavaScript almost anywhere_"
es flag
@leymannx isn't at least one case of using JavaScript in Drupal GUI would mean lack of decoupling backend from frontend.
Score:2
de flag

Headed means there is a GUI (Graphic User Interface). Headless means a system without that. Drupal can be run headless - there are headless distributions out there that can be used as the back-end for apps or a React site or whatnot. However, by default it's headed - Drupal core has a GUI out of the box. Decoupling refers to separating the head (GUI) and the back-end. Drupal is decoupled in that it separates the front end from the back-end.

Drupal is by design not decoupled because it does have built in JavaScript almost anywhere

Drupal is decoupled, and it does have an extensive, powerful JavaScript API that ships with core: https://www.drupal.org/docs/drupal-apis/javascript-api/javascript-api-overview

Score:1
cn flag

Drupal can be used decoupled, and as new features are added to Drupal 9, support for decoupling is given high priority under the API-First Initiative (ensure APIs are provided that allow programmers to select the parts of Drupal they want to use, and replace other parts as needed with custom solutions).

Historically, Drupal 7 + older versions are NOT decoupled (although older versions can e used headlessly with contributed modules), but starting from Drupal 8, decoupled use is supported by Drupal core itself.

Yes, Drupal does provide a frontend-- but this frontend is provided through modules that can be disabled. So Drupal can be used decoupled because it does not force you to use its UI; you can disable the Drupal UI and replace it with something else, like a React or Angular app.

What does headless use actually look like?

Contenta is a headless Drupal distribution that can give you an idea of how to set up Drupal for headless use.

To actually get at your content, Drupal provides support for JSON:API and REST in Core, and GraphQL is available via a contributed module. The JSON:API support is particularly great because it lets you expose all your content with Drupal permissions intact with very little additional configuration.

However, this is a pretty complex topic; there's a whole book on it:

There's also a great series of tutorials available at Drupalize.me.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.