A stable version of Recipes is yet to be released in 2023, this initiative is a prominent part of Drupal 10.
Drupal 10 provides a powerful platform for building websites and applications. It offers various ways of site-building, including profiles, distributions, and now recipes.
As part of the Drupal strategic initiative, site-builders & developers can greatly benefit from the improvements to be provided by the recipes initiative.
Drupal 10 recipes are expected to provide more flexibility and ease of use to site builders and developers, allowing them to create custom solutions that meet their specific needs. Although a stable version of recipes is yet to be released in 2023, this initiative is a prominent part of Drupal 10 features.
This blog will help you understand how recipes are different from profiles and distributions and how they are a way forward in Drupal site-building.
Understanding Profiles & Distributions
Profiles and distributions are often confused, but they are not the same thing. Drupal vanilla, or the basic Drupal installation, is relatively bare and lacks many of the essential features required to create a full-fledged website.
Profiles and distributions are pre-configured packages that contain a set of modules, themes, and configurations that can be used to create a specific type of website.
Profiles and distributions are pre-configured packages that contain a set of modules, themes, and configurations that can be used to create a specific type of website.
Distributions are built on top of Drupal and provide a use-case-specific package. They include a pre-selected set of modules, themes, and configurations that are designed to fulfill a particular use case.
For instance, a media and publishing distribution will include modules like feed, carousel banner, facet search, or similar features specific to media websites.
Distributions are a great way to get started quickly and provide a solid foundation to build on top of.
Profiles, on the other hand, are subsets of distributions and are included in Drupal core. Drupal core comes with three installation profiles: Standard, Minimal, and Demo (Umami).
Installation profiles determine the set of modules, themes, and configurations that are included in a distribution.
For an e-commerce site, one could use the standard installation profile as a base and add additional modules and themes to customize the site.
Drupal vanilla is bare and lacks any pre-configured settings or features. Profile and Distribution are similar concepts in Drupal, but serve different purposes.
Enter recipes!
What are Drupal Recipes?
Recipes are a modular approach to site-building in Drupal. They are small use cases that can be easily combined or customized to create a unique solution. Recipes are like microservices that can be plugged in and played as needed.
Recipes are modular building blocks that allow developers to create custom site features quickly and efficiently.
A distribution is a use case that customizes Drupal to fulfill a specific need. Unlike distributions, recipes do not use installation profiles and can be tweaked at any point in the site-building process.
Installation profiles are part of Drupal core. These profiles determine which set of modules, themes, and configurations are installed during the initial setup of your Drupal site.
The actual backend of any distribution is happening here, as installation profiles are responsible for setting up the initial site structure.
A Profile is a type of distribution that provides a more focused set of features for a specific use case. Profiles can be thought of as smaller, more specific distributions that cater to particular needs.
Unlike distributions, recipes do not use installation profiles and can be tweaked at any point in the site-building process.
To illustrate the differences between these site-building methods, let's consider an example. Suppose you want to build a news website that includes features such as a feed, carousel banner, and facet search. You could use a pre-built news distribution that includes these features out of the box.
However, if you need to make further customizations, you would need to modify the installation profile or distribution, which could be time-consuming and complicated.
Alternatively, you could use an installation profile such as Standard and then install the necessary modules manually. This approach provides more flexibility, but it requires more effort and expertise to set up.
Finally, you could use a recipe approach and install each required module and configure them individually. This approach provides the most flexibility but requires the most effort to set up.
Steps to install Drupal recipe
Why Recipes?
One of the primary objectives of Recipes initiatives is to overcome the challenges, site maintainers and developers face with distributions and to:
- Allow users to install multiple Drupal recipes on the same project, unlike the current scenario where selecting a distribution like OpenSocial prohibits the installation of another distribution like Commerce Kickstart or Thunder. This limitation will be eliminated, and multiple Drupal recipes can be installed on the same site.
- Install a recipe at any point in a project's life cycle, which is currently not feasible. For instance, if a user wants to incorporate community collaboration tools in their site after a few years of using standard Drupal, they can do so without any impediment.
- Simplify the process of maintaining the multisite architecture. This initiative aims to ensure that any changes made do not create additional challenges in this regard.
- Make updating easier, which is currently a challenging task as every existing site is in a different state, the Update Helper module developed by a few distributions will be integrated into the core.
- Make it easy for Drupal recipes to provide demo content, which is currently done in different ways such as importing from CSV or using custom modules, a functionality will be provided in the core to enable Drupal recipes to ship demo content.
What Drupal recipes are not
Drupal recipes have certain limitations, such as:
- The inability to provide functionality themselves, like implementing hooks and services. In cases where a Drupal recipe requires custom functionality that involves code, this must be included in a regular Drupal module.
- Once a Drupal recipe has been applied, the responsibility for updating configuration and content falls to modules and core, and the recipe cannot provide an upgrade path.
-
Can't be part of a deployment. Deploying the content created by a Drupal recipe is out-of-scope.
Wrapping Up
In conclusion, Drupal provides several site-building methods that allow users to create custom solutions to their specific needs. Profiles, distributions, and recipes are all powerful ways that can help you build your Drupal site efficiently and effectively.
Drupal 10 recipes are an exciting addition to the Drupal ecosystem and will help make building websites and applications faster and more efficient than ever before.
As a leading open-source community leader, OpenSense Labs has helped numerous enterprises transform their digital presence with our expert Drupal services and solutions. From custom Drupal development to UX design, we have the experience and expertise to help your organization succeed in the digital landscape.
Don't miss out on the opportunity to partner with a trusted and experienced team. Contact us today at hello@opensenselabs.com to learn more about how we can help you achieve your digital goals.
Articles Off