Many front-end technologies, especially React, now consider the notion of declarative components to be table stakes. Why haven't they arrived in environments like the Drupal CMS's own front end? Many native CMS presentation layers tend to obsolesce quickly and present a scattered or suboptimal developer experience, particularly against the backdrop of today's rapidly evolving front-end development workflows. But according to Fabian Franz, there is a solution that allows for that pleasant front-end developer experience within Drupal itself without jettisoning Drupal as a rendering layer.

The solution is a combination of Web Components support within Drupal and intelligent handling of immutable state in data that allows for Drupal to become a more JavaScript-like rendering layer. Rather than working with endless render trees and an antiquated Ajax framework, and instead of reinventing Drupal's front-end wheel from scratch, Fabian recommends adopting the best of both worlds by incorporating key aspects of Web Components, the Shadow DOM, and particularly syntactic sugar for declarative components that competes readily not only with wildly popular JavaScript technologies like React and Vue but also matches up to the emerging approaches seen in ecosystems like Laravel.

In this Tag1 Team Talks episode, join Fabian Franz (VP, Software Engineering at Tag1), Michael Meyers (Managing Director at Tag1), and your host and moderator Preston So (Editor in Chief at Tag1; Senior Director, Product Strategy at Oracle; and author of Decoupled Drupal in Practice) for a wide-ranging technical discussion about how to enable declarative components everywhere for Drupal's front end out of the box. If you were interested in Fabian's "Components Everywhere" talk at DrupalCon Amsterdam last year, this is a Tag1 Team Talks episode you won't want to miss!





Related Links

DrupalCon Amsterdam 2019:Components everywhere! - Bridging the gap between backend and frontend

Insider insights on rendering and security featuresWhat the future holds for decoupled Drupal - part 2

Livewire

Laravel Blade Templates

Inertia.js

Mortenson's WebComponents server-side shim

AJAX API Guide on Drupal.org

Chat with the Drupal Community on Slack: https://www.drupal.org/slack

Vue.js

Lit-HTML

Other mentions:

Preston’s newsletter: Preston.so

Preact - Fast 3kB alternative to React with the same modern API https://preactjs.com/

Descript.com - Uses AI to transcribe Audio (PodCasts) and Video into text, providing you with a transcript & closed captioning; edit the audio/video by editing the text!


For a transcript of this video, see Transcript: Enabling Declarative Components Everywhere: Drupal + Web Components Out of the Box - Tag1 TeamTalk #019.


For more on Web Components and how they're being used, see Web Components.


Photo by Ren Ran on Unsplash.