Drupal Advent Calendar day 16 - Starshot Building Blocks

By james, 1 December, 2024
Door 16, revealing popular construction toy bricks, with logos for Recipes, Automatic Updates, and Project Browser

Today we open our sixteenth door, and rather than another track of the Starshot initiative, we have some succulent little treats. Three things that are essential to make Drupal CMS a reality. While the Starshot initiative only officially started last April, it has made incredible progress to get to a release candidate this month, and is on track for a first formal release in January 2025. But today we are talking about some initiatives to Drupal that have been underway for several years. Without the groundwork they have laid, it’s unlikely that Starshot could have made such rapid progress.

Drupal Recipes

Recipes are perhaps the cornerstone of Drupal CMS. Most of the tracks are focused on building recipes. The Installer we visited on day 2 presents recipes to apply during the initial site installation, and you can browse recipes within a Drupal CMS site and apply them to the site.

A recipe cannot contain any code, but it can install modules, and it’s not limited to core modules. But the thing that makes recipes really powerful is the ability to apply configurations. It can also create content if necessary.

This allows recipes to install a suite of modules together, and to configure your site to provide a piece of functionality in a way that follows best practices.

Jim Birch wrote a fantastic blog post that dives deep into the functionality Recipes provides.

But while Recipes was added to Drupal core in version 10.3, the work is not finished. There is lots underway that will roll out in future Drupal releases. For example, one change will allow a config action to be applied for every bundle of an entity type. This will be super useful for allowing recipes to act on customizations that have been made to previous recipes, for example, allowing configuration to be applied to all content types, without the recipe needing to know what those content types are. Another important change for Starshot is allowing recipes to prompt for input values. This will allow recipes to be applied more flexibly, for example, applying only to specified content types, or selecting which language the multilingual recipe installs.

Automatic Updates

One thing that has never been easy with Drupal is keeping a site up to date. This is particularly important these days with constant concerns about vulnerabilities exposing private information on the web.

Automatic Updates is a project that aims to simplify this process significantly. It will allow security patches to be applied with no intervention to ensure they are applied as soon as possible. Minor updates and module updates do require an admin to authorize and initiate the update, but it is as simple as pressing a button, rather than the command line work required previously.

Screenshot of the update page, showing everything up to date
Everything is up to date!

One of the aims of the Starshot initiative is to allow non-technical users to update on a test site, verify the updates are working correctly, then migrate to a production site, without needing to master command line tools like git. This probably won’t be in the initial release, but several innovative approaches are being explored.

An important milestone for Automatic Updates is the inclusion of Package Manager in Drupal Core from version 11.1. This is an important sub-module that facilitates installation and updating in a very clean, reliable way, using the underlying Composer. This is used by both Automatic Updates and Project Browser, and is an important first step towards those getting into Drupal Core.

The Automatic Updates initiative has been led by Ted Bowman.

Project Browser

Project Browser aims to make it easy for users to find and install functionality to extend their site. It has made significant progress in cleaning up the list of project categories, and providing logos and better short descriptions for the most popular modules.

While the initial focus was on modules, as Starshot has developed, attention has increasingly shifted towards recipes. Fortunately, Project Browser was designed to be modular from the outset, so adding a Recipes tab proved fairly easy. I think this has potential to make it significantly easier for users to add and configures a piece of functionality rather than a single module.

Another important addition for Starshot is the addition of a mini browser. This may be used in the Drupal CMS installer in the future, and also for quick access to adding additional recipes within the Drupal CMS UI, without needing to go to the full “Extend→Browse→Recipes” menu.

Screenshot of Project Browser listing available recipes
Recipes available in Project Browser

Currently the Recipe browser only list local recipes. The aim is to also allow browsing of remote recipes, and for them to be downloaded and applied.

This is a project close to my heart as I’ve been quite involved in contributing to it, so it’s great to see it coming into its own as part of Drupal CMS. The initiative has been led by Chris Wells and Leslie Glynn, and it has been a pleasure to work with both of them.

Photo of JamesJames Shields (lostcarpark) is coordinator of the Drupal Advent Calendar. He has been using Drupal since 2007 and has been building several of his own modules as well as maintaining a few he inherited. He also likes LEGO and organising Science Fiction conventions.

Comments

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.