Recipes for a Better and Easier Drupal

"The goal is more flexibility in getting started with Drupal for a specific use case, easier installation of one or more feature sets, and easier maintenance and upkeep."
Distributions and Recipes - Drupal Initiative logo

The Distributions and Recipes Initiative in Drupal aims to revolutionize the platform's basic configuration by introducing "recipes." These predefined sets of functionality cater to specific needs, such as blog and e-commerce sites, providing enhanced flexibility for site builders and developers. The initiative, organized into three primary tracks, focuses on Drupal.org improvements, Drupal features, and installation remediation, ultimately offering improved flexibility and ease of use. 

In an initiative to learn more about the Drupal initiatives that help Drupal tread the path of innovation and advancement, The DropTimes (TDT) reached out to the initiative leads and contributors of Distributions and Recipes. Tim Hestenes Lehnen and Jim Birch, the initiative leads of the Distributions and Recipes Initiative, graciously accepted our request and, in an email correspondence with Alka Elizabeth, sub-editor of TDT, shared their inputs.

The most apparent and curious question behind the introduction of any initiative is what motivated it. 

"Drupal has had the concept of 'Distributions' for over a decade. "

says Tim Lehnen, inititaive lead.

Then, distributions were a specific set of modules, themes, and custom code organized around particular use cases like commerce, events, publishing, etc. 

"However, the current technical architecture of distributions has significant limitations. You cannot mix and match distributions, cannot uninstall them, and need to rely heavily on the maintainer to update your distribution as various components are updated."

Tim emphasizes that while Drupal's flexibility is unparalleled, it can also present a considerable challenge for new users attempting to construct their solutions from scratch. The diverse objectives, such as developing an e-commerce shop with a complementary blog, building an intranet, or establishing an online community, all require distinct functionalities. Lehnen highlights the absence of a straightforward method to seamlessly integrate this varied functionality without comprehensive research into the requisite content types, modules, and associated components.  

"And even once you've used Drupal as a platform to build the bespoke solution you need for your use case, it can be difficult to propagate that setup to additional Drupal sites you might maintain."

Large brands overseeing websites for multiple product lines, universities managing sites for various departments, and government entities aiming to standardize their deployments face these challenges. Lehnen highlighted the substantial complexities involved in facilitating such diverse and demanding work.  

The birth of the Distributions and Recipes initiative could be traced back to 2022 as "Starter Templates." Starter Templates were about installing and configuring groups of modules. For example, Starter Templates for an event website or a product website would include all of the necessary modules and configurations required for that type of website, noted Dries Buytaert in his blog.

"This concept bears a lot of resemblance with Drupal's 15-year-old concept of Drupal distributions. The goal of Starter Templates, however, is to be a lot easier to build and maintain than distributions."

Distributions and Recipes is an evolution of this idea, confirms Tim Lehnen.

People who choose to use a Drupal distribution often face challenges due to lack of maintenance and often have to do expensive revamps when new versions of Drupal come in. The idea of Distributions and Recipes is to make it possible to use multiple recipes together, make them easily installable and uninstallable, and use config validation and other techniques to make it easier to update the individual components without relying on the maintainer to update the whole package. 

"The Recipes Initiative is a great example of making it easy for people to be part of Drupal and the open web."

Dries Buytaert, Founder of Drupal.

On the question of the benefits of using Recipes over traditional Drupal distributions and installing profiles, both Tim Lehnen and Jim Birch chipped in their thoughts. Applying recipes on Drupal allows for flexible alteration within individual sites, relieving distribution maintainers from the post-installation burden of upgrades and support. This approach is built upon the foundations of existing configuration management and config validation, prioritizing ease of maintenance. It also enables the mixing and matching of recipes, offering enhanced customization. Future phases are expected to introduce the ability to install using the Project Browser.  

In terms of improving the experience of site builders and developers, recipes will be able to capture all that has been done in Admin UI.

"Think of everything you have to click together once you enable a module.  That could all be done in a repeatable way, where you could apply existing functionality to a site and not have to rebuild the same or a similar feature over and over again."

noted Jim Birch, Initiative Lead, Distributions and Recipes Initiative.

He also adds that there aren't any planned changes to the current way of implementing distributions in contrib, or installation profiles in core and contrib.

There are no distributions in the core.  We hope that distribution maintainers can use recipes as a tool in their toolkit to help ease the maintainership of their modules.

For installation profiles, we are looking at what the core Minimal, Standard, and Umami profiles do, and have issues to replicate them as recipes. If we can improve this experience, then we explore how recipes could work with, or replace installation profiles in future phases.

More details on the initiative can be found at https://www.drupal.org/about/core/strategic-initiatives-distributions-and-recipes. 

The Distributions and Recipes Initiative invites active participation from the Drupal community. To get involved, join the #distributions-and-recipes channel on Drupal Slack, where meetings, following the Slack meeting format, are held every two weeks on Tuesdays at 1600 UTC (Noon EST). All interested contributors are welcome to these sessions.

Tim Lehnen also adds the top three endeavors being worked on at the moment. These are great places to contribute, depending on what type of contributor you are.

Developers: 
[META] Make recipes safer to use in the real world by supporting config validation and rolling back a broken recipe 
Recipe Creators:
Model core's standard install profile as recipes
Site Builders and Documenters:
[META] Recipe maintainer and end-user documentation

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please let us know in the comments below and we will try to address the issue as best we can.

Related Drupal Initiatives

Advertisement Here

Upcoming Events

Latest Opportunities

Advertisement Here