Drupal Planet

Evolving Web: Where’s Your Head? The Case For (and Against) Headless CMS

1 month ago

Headless content management systems – they’re all the rage. With a market growing at a rate of over 22 percent per year,  according to ReportLinker, headless CMS is increasingly the format of choice for e-commerce companies, news organizations and others who deal with a revolving door of content delivered across multiple platforms.

So what, then, is a headless CMS? 

In short, it’s a back-end-only content management system that is not coupled with any front-end presentation layer or “head”. Also referred to as a decoupled CMS, a headless CMS exists primarily as a content repository, transmitting content via an application programming interface (API) to whatever channels the content is aimed at.

Since the birth of the Internet, the vast majority of CMSs have been of the “coupled” variety (the kind most readers will be familiar with), wherein content is uploaded to a back-end and is then automatically transmitted to a pre-built front-end delivery layer. This format has obvious advantages, namely its simplicity – anyone with basic CMS training is able to create and update a website’s content and the front-end is standardized, making it easier to build your website quickly.

However, with the advent of mobile apps, chatbots, the Internet of Things (IoT) and other innovations, many companies and organizations now expect the information on their CMS to be able to do a lot more than just exist on a website. For many, the page layout systems offered by traditional CMSs are a constraint to developers and marketers and can impede the adoption of new third-party technologies.

The case for decoupled architecture

In a headless CMS, front-end developers have free rein to build as many “heads” as they want for as many channels as they want to deliver content to. While this may require more IT expertise on the client end, due to it being harder to preview content, there are numerous advantages to this structure.

From a scalability standpoint, the advantages of a headless CMS are self-evident. In a traditional coupled system, CMS code is tightly connected to a particular set of templates, which means that expanding to new platforms such as native apps or digital signage involves a great deal of customization and installations on the part of developers. By contrast, with a headless CMS, there are no limits to the platforms that can be added.

Speed and Scalability

In the case of a rapidly expanding business, a traditional CMS places constraints on a website’s capacity to expand. Adding discussion forums, AI chatbots, and other add-ons all mean additional server requests, which in a traditional CMS will slow down the performance of the website while creating a messy patchwork of plugins. A headless CMS, by contrast, means you can offer increasingly diverse services without sacrificing speed and performance.

For companies and organizations that maintain different versions of a website for various languages, locations or franchises, a headless CMS can mean less stress over version control. Because all the content is stored in a single location, the headless format makes it much easier to keep track of what changes have been made where and when and allows you to push revisions out to multiple sites simultaneously.

If you’re a prominent news organization and you’re likely to have articles and videos going viral, you definitely want a decoupled CMS. With a traditional CMS, any sudden burst of traffic is liable to overwhelm the server and paralyze your site – unless you pay for hosting that will accommodate enormous spikes in bandwidth use. This is a non-issue with a headless CMS, where heavy traffic on the front end doesn’t impact the back end at all.

For retail websites, speed truly matters – sites that load in one second have an e-commerce conversion rate 2.5x higher than sites that take five seconds to load, according to Portent – and sites underpinned by headless CMSs are faster across the board. With coupled CMSs, loading a page requires the server to make dozens of automated requests, although advanced caching can solve many of these challenges when in the hands of an experienced team. A single request for a hand-coded HTML website linked to a headless CMS, however, will load in less than a second.

Read more - Building Decoupled Drupal - Part 1: Choosing Your Application

Enhanced security 

Headless CMSs also offer greater security. Sites with traditional CMSs are much more vulnerable to distributed denial-of-service (DDoS) attacks, in which hackers attempt to overwhelm a site by flooding it with superfluous requests – which with a headless CMS translates to a single request. Also, because the API publishes headless content as read-only, it can be protected by multiple layers of code, lessening the risk of attacks.

The case against

While a headless CMS offers great advantages in terms of scalability, stability and security, it also presents challenges and drawbacks and is certainly not suited to all organizations. A traditional CMS with its out-of-the-box front-end templates is advantageous for organizations that lack the internal IT capacity to develop front-end applications or the budget to hire outside developers to develop and maintain a custom solution.

A headless CMS is, by its nature, more complex and more expensive than a traditional CMS, requiring an upfront cost for the CMS, the development team, and the necessary infrastructure to run your website, app and whatever other tools are using the CMS. Headless CMSs also come with formatting challenges, as they do not necessarily allow you to preview what content will look like on the page, requiring extra steps.

For organizations whose websites are largely informational and static, and are unlikely to be suddenly overwhelmed with high demand, a headless CMS is not optimal. With a traditional CMS, the front-end is standardized, meaning that you benefit from existing templates for standard features like the user login page, search results page, etc. You also benefit from the accessibility and SEO work that has been done to optimize the standard templates.

When you build a custom front-end, on the other hand, you take full responsibility for all of these aspects of your website.

The best of both worlds?

For those looking for the scalability and stability of a headless CMS while still benefiting from the out-of-the-box front-end templates offered by conventional systems, a middle ground exists in the form of a hybrid or “progressive decoupled” CMS. As a decoupled system with a content-as-a-service (CaaS) API, a hybrid CMS enables content delivery across multiple channels while also offering marketers the types of interfaces they’re used to from conventional CMSs.

There are some disadvantages here compared to a fully headless CMS. It may be more difficult to take advantage of microservices and omnichannel delivery with a hybrid system versus a fully headless one, and it does not offer the same flexibility when it comes to publishing dynamic content on a multitude of platforms. It can also be more complex to maintain than a fully headless CMS due to the presence of both front-end and back-end code.

Nevertheless, for many organizations looking for high-performance sites with maximum speed and security while avoiding the hassle and cost of from-scratch front-end design, a hybrid CMS might be the perfect solution. You can seen an example of this in action with the work we did for Princeton International, whose curriculum planning tools were built with decoupled components.

Train your team - Decoupled Drupal with Gatsby

Headless Drupal

Drupal has long been associated with its flexible front-end theming system its content publishing features. This might lead one to think that Drupal isn’t the best choice for a headless CMS. However, since Drupal 7, it has been an API-first CMS that provides multiple ways for external systems to integrate with it and is in fact very well suited to a decoupled structure.

When Drupal 8 was released, the ability to function as a decoupled CMS was built into the core with the introduction of a RESTful web services API. This type of API, based on the representational state transfer (REST) architectural style, is ideally suited to building a decoupled site or integrating with an iOS or Android app or other web services.

Of course, some of Drupal’s much-vaunted front-end functionality (i.e. templates) is lost or inhibited in a headless setup, which will generally make it much harder to “preview” web content prior to publishing (previewing would require a custom preview workflow, like that provided by Gatsby). However, a hybrid setup will enable you to fully maximize the benefits of using Drupal while still benefiting from all of the advantages of a decoupled CMS.

Is a headless approach right for you?

When considering opting for a headless CMS, it’s important to consider how much time and energy (and budget) you have to commit to your web services. If you have the internal capacity for dedicated front-end development or the budget for ongoing external support in this area, a fully headless approach might well be right for you, especially if you’re dealing with dynamic content across multiple channels.

Conversely, if you’re not a developer and don’t have one on your team, and it’s important for you to be able to preview content prior to publishing, a headless CMS is probably not a good option. With that said, if you deal with potentially viral content and are looking to expand across multiple platforms, but still want to be able to preview content and take advantage of Drupal’s many out-of-the-box features, a hybrid solution might be a good option for your organization. 

//-->

+ more awesome articles by Evolving Web

Oomph Insights: Keeping a Remote Team Connected: Oomph’s 2022 Summit

1 month ago
Being part of a 100% remote team has its ups and downs. While Oomph had remote employees well before the pandemic, we shifted to a fully distributed team as a result of it. And while the glorious flexibility we have to work from anywhere in the US is hugely supportive, it comes with some challenges — like feeling disconnected. As a personal team, relationship building is crucial to us, and we’ve used virtual and in-person gatherings for years to help us unite. While the pandemic sure did squash our ability to share physical space, it also reinforced the importance of supporting each other. So…

Drupal Core News: Drupal 10.0.0-beta1 and Drupal 9.5.0-beta1 will be released the week of September 12, 2022

1 month ago

In preparation for the new major release, Drupal 10.0.x and Drupal 9.5.x will enter the beta phase the week of September 12, 2022.

Core developers should plan to complete changes that are only allowed in major releases before the beta release. The Drupal 10.0.0-beta1 and Drupal 9.5.0-beta1 deadline for most core patches is September 9, 2022.

Developers and site owners can begin testing 10.0 and 9.5 once the betas are released.

During the beta phase, core issues will be committed according to the policy on allowed changes during beta.

  1. Most issues that are allowed for patch releases will be committed to 10.1.x and backported to 10.0.x, 9.5.x, and 9.4.x.

  2. Most issues that are only allowed in minor releases will be committed to 10.1.x only. A few strategic issues (such as PHP 8.2 or Symfony 6.2 compatibility fixes) may be backported to 10.0.x and 9.5.x, but only at committer discretion after the issue is fixed in 10.1.x (so leave them set to 10.1.x unless you are a committer), and only up until the release candidate deadline.

The 10.1.x branch of core has already been created, and future feature and API additions are already targeted against that branch instead of 10.0.x.

Further beta releases may be made available as needed.

The release candidate phase will begin the week of November 14. See the Drupal 10.0.0 requirements for the issues required between 10.0.0-beta1 and 10.0.0-rc1 or 10.0.0.

The scheduled release date for Drupal 10.0.0 and 9.5.0 is December 14, 2022.

Bugfix and security support of Drupal 9

Security coverage for Drupal 9 is generally provided for the previous minor release as well as the newest minor release. Based on these the following changes are upcoming:

Drupal 9.3.x Security releases will be provided until the release of Drupal 9.5.0 on December 14, 2022. Drupal 9.4.x Normal bugfix support ends on December 14, 2022. Security releases are provided until the release of Drupal 10.1.0 on June 21, 2023. Drupal 9.5.x Normal bugfix support ends on June 21, 2023 with the release of Drupal 10.1.0. Security releases are provided until the end of life of Symfony 4 in November 2023.

Promet Source: Proper Care and Feeding of a Drupal Site

1 month ago
The topic of open source vs. proprietary software for government websites – actually any website – is the source of a lot of conversation and consideration these days.  Very often, it’s website maintenance and support that proves to be the key differentiator. 

Specbee: The Ultimate Guide to Jumpstart your Drupal Contribution Journey

1 month ago
The Ultimate Guide to Jumpstart your Drupal Contribution Journey Ankitha and Su… 23 Aug, 2022 Subscribe to our Newsletter Now Subscribe Leave this field blank Introduction

Being an open-source content management system, Drupal encourages contributions from the community of developers and users worldwide in various forms. It could be in the form of code which includes patches to core and contributed projects, in non-code ways including marketing, documenting, event organization or by monetarily supporting the project. This article will walk you through everything you need to know to start your Drupal code contribution journey from scratch.

Why Contribute to Drupal

Of course, giving back to a project that supports the way you work and probably live every day might be a strong enough reason for you to voluntarily contribute and improve the open source project. But if you’re looking for a little more incentive to contribute, here are some of the benefits we’ve seen:

  • Your contributions help Drupal stay relevant and up-to-date with the advancements happening in all its dependencies over time
  • You can gain more knowledge about Drupal which in turn will enable you to build better applications for your clients
  • It gives a competitive edge to the organizations that sponsor time for contribution as their developers are gaining more skill and knowledge and by showcasing themselves as an expert
  • Collaborate and meet with people who share the same interests as you
How to Contribute

To begin with, create an account on drupal.org for yourself and update your profile with the required details.

Account creation on Drupal.org

Look for an Issue

Once the account is created, the next step would be to find the right issue. It might vary based on your interest:

1. You could find an issue from the issue queue - https://www.drupal.org/project/issues. For more specific searching, you could click on the ‘Advanced search’ and use the filters.

  • Issue tags - Issues are attached with different tags. The “novice” tag indicates that the issue needs a simple fix and any beginner could choose it, the “Needs documentation” tag indicates that this issue needs some documentation change, and so on.
  • Issue status - Once the issue is created it goes through different states. Based on the current issue status, you could decide the next steps it needs to move forward. 
  • Issue priority - It defines the priority of the issue, whether it’s a critical bug or it could be a minor fix.
  • Issue category - It indicates the category of the issue, whether it's a bug, or is it a task, or it could be a new feature request to the project.
  • Specific project - Here you could directly specify the project that you are interested in.

Issue filters

2. Or start from the project you were always interested to work on, by visiting the module/theme/profile page - https://www.drupal.org/project/. In the right sidebar, look for “All issues” link - https://www.drupal.org/project/issues/?categories=All

3. Or work on a bug that you came across in core, or any contributed modules/themes/profiles while working on a project. It’s also the right way to contribute. One should always practice keeping their “contributor mode” ON even while working on projects, this gives an opportunity to explore and contribute a fix to hidden issues!

Life Cycle of a Drupal Issue

Once an issue is created, it goes through different states. The following are the different issue statuses you will come across:

  1. Active - When a new issue is created, it is in an Active state.
  2. Needs review - When the issue needs to be worked upon, it is in a Needs Work state.
  3. Needs work - Once the issue is picked, the patches are successfully submitted and all the test cases are passing, the issue’s state should be changed to Needs Review.
  4. Reviewed & tested by the community - Once the issue is reviewed by any contributor, the issue is moved to the “Reviewed & tested by the community” (RTBC) state where one of the members from the core community team reviews the issue.
  5. Fixed - When an issue passes from the RTBC state, it is moved to the Fixed state.
  6. Closed (fixed) - After the Fixed state, the issue moves to Closed (fixed) automatically within two weeks. This is the last state of an issue.
  7. Closed (duplicate) - When any issue gets created which is a duplicate of any earlier one, it directly gets closed as Closed (duplicate).
  8. Closed (won’t fix) - This state represents that an issue has no solution.
  9. Closed (works as designed) - This state represents that an issue raised is providing the functionality what it was supposed to and so moved to “works as designed”. In other words, the issue raised is not a bug but a feature.
  10. Closed (cannot reproduce) - When an issue is not reproducible is moved to this state.
  11. Closed (outdated) - When an issue is either too old to fix or gets fixed within some other module’s issue, the state can be Closed (outdated) for that issue.
  12. Patch (to be ported) - When a Patch is to be ported for other versions of the Drupal/Contributed module.
  13. Postponed - When the Issue/Feature/bug is postponed by the author/community and doesn’t need a fix.
  14. Postponed (maintainer needs more info) - When an issue is raised but according to the maintainer of the Contributed module, more info is needed about the issue to get it fixed.
Create an Issue

To create an issue for the module. Go to the issue queue of the module https://www.drupal.org/project/issues/?categories=All and click on Create a new issue.

 

The next step is to give details of the issue that needs to be created.

 

1. Title: Add the title of the issue.
2. Project: The project name will be auto-selected.
3. Category: Select the category of the project. There are 5 category

  1. Bug: A bug is a functional error in the system. For example, php error, data loss, memory leak, Incorrect or misleading documentation, Incorrect or misleading user interface text etc.
  2. Task: These are not a functional bug but “needs to be done” before the release. For example Refactoring code to make it more readable, and maintainable, Adding automated tests, Updating code to new APIs, Improving coding standards etc.
  3. Feature request: This is a request for completely new functionality to be added to the module.
  4. Support Request: If we need help on any part of the module or want to know about the drupal core functionality. We can tag support requests and add the question.
  5. Plan: This tag is used when you have a problem that can not be resolved using one issue. Plan issues will often have multiple sub-steps related to "child" issues.

4. Priority: Select the priority of the issue. Here we have Critical, Major, Normal and Minor. Choose normal unless it's really serious. Or you can select it as normal and let the maintainer or reviewer can change it as required.

5. Status: Select Active for new issues.
6. Version: Select the version of the project in which the issue has to be fixed.
7. Component: Select the nearest match to the issue. These can be changed later. The components here are based on the module. The options defers from module to module. 
8. Assigned: The issue can be assigned to anyone. It is not mandatory and can be assigned later. 
9. Tags: Tag the issue with appropriate tags. This can be left empty if we don't have knowledge of issue tags. This is not mandatory and can be tagged later.
10. Issue summary and Relationships: Expand the field and we have the editor add the details of the issue. There are some predefined headings in the editor and we can replace them if we don't want them in the issue details.

  1. Parent issue: To tag the parent issue.
  2. Related issue: To tag the related issue.

11. Files: We can add the files related to the issues or we can upload the patch to the issue while creating under files. And save the issue.

After saving the issue. The created issue will be added to the issue queue of the respective module.

To create an issue for the drupal core https://www.drupal.org/node/add/project-issue/drupal is the link. And the steps will same as creating the issue in the module. But there are some guidelines to create a core issue which will be displayed on the above link.

These are the guidelines to be followed while creating the core issue.

Create a Patch

There are 2 cases here

  1. Create a new patch
  2. Update the existing patch.

To create a new patch

  •  Go to the version control tab of the module. https://www.drupal.org/project/ /git-instructions is the link to the page.
  • Select the branch to work and click on the Show button.

 

Clicking on the show button will get you the git command, copy and run the command in your terminal and change the directory to the cloned module.

  • Do the changes to fix the issue.
  • The command to create the patch is: 
git diff > --.patch

 

  1. Issue description will be the title of the issue, where all the letters should be lowercase and space must be filled with underscores. This is optional.
  2. The issue number will be in the URL of the issue. This will be unique for the issues this will be mandatory in naming the patch file.
  3. The comment number is the latest comment id in which the patch will be uploaded.

 

Consider you need to add a new file to the patch. The new file will be untracked and the command git diff will not track the file.

To add a new file to the patch

  1. Add the new file using the git add command
  2. Run
git diff HEAD > --.patch

To update an existing patch

 1. Clone the project to which you need to add the patch.
2. Goto the issue page right click on the patch link and click on Copy address link.
3. Download the patch to your local using the curl or wget command.

To download the patch using the curl command:

curl -O


4. To apply the patch run the command:

git apply


5. After applying the patch you will get the changes of the patch in your local. Add the further changes required to the patch and create a new patch.

When we are updating the existing patch we need to create an interdiff file. Interdiff file is nothing but a difference between the old patch and the new patch. This will help the reviewer to know the changes done in the new patch.

The following is the command to create an interdiff:

interdiff > interdiff_-.txt

Consider you have an old download patch 3302030-2.patch and a new updated patch you have created 3302030-3.patch. To create the interdiff between these two files, the command would be:

interdiff 3302030-2.patch 3302030-3.patch > interdiff_2-3.txt Submit a Patch

After creating a patch we need to submit the patch.

To submit the patch go to the issue page.

1. Issue metadata

 

In the issue metadata, change the status to the needs review. Unassign the issue if the issue is assigned to you and add or remove the tags as needed.

2. Attribute this contribution

 

Check the relevant options and add the organization if you are working for any organization. Adding this the credits will be given to the organization along with you when the issue gets fixed.

3. Add a description of the changes done in the patch under the comment section.
4. Choose the patch file, interdiff file and upload it under files.

 

Here we have added the files one by one and hit on upload after choosing the file. Clicking on upload the file will be uploaded and gets added to the list below.

NOTE: Interdiff is not required while adding a new patch.

5. After uploading the file click on the save button. This will update the issue page and  we can see the patch uploaded with a new comment number.

Patches for core issues should be submitted using the same procedure.

Review a Patch

Now you know how to look for an issue, create a patch and upload it. What’s next? How can we make sure that the right patch gets committed ASAP?  Reviewing a patch is an equally important step in moving the issue forward. If you feel that writing lines of code aren't your thing, then why not try reviewing the existing patches?

Before we begin, would highly recommend adding Dreditor extension to your browser.

Dreditor extension

It provides you with a ‘Review’ button for the patch/interdiff files. On click, it displays the changes in an easy-to-read format.

‘Review’ button from Dreditor

Patch file changes without Dreditor

 

Now we are all set to find an issue for reviewing!

  • Filter the issues with the status ‘Needs Review’.
  • Take your pick from the list.
  • Read through the comments & pick the latest patch uploaded in the issue.
  • Make sure the patch has passed the test cases and has turned green.

Patch that passed the tests

  • Download the patch file and apply the patch on your local into your core/module/theme/profile by running: 
     
git apply -v
  • Test if it’s working as per expectation/needs some work.
  • Change the issue status and add comments with images/videos supporting your points. Your comment should have details like, whether the patch applied to the latest version, what steps were followed to reproduce the issue, issue behavior before & after applying the patch etc.
  • If all looks good, change the status to ‘RTBC’.
  • If there is any scope for some extra work/changes, update the status to ‘Needs Work’.
Other ways to Contribute

Other than code contributions, the Drupal project has many areas that you can contribute to including improving its quality and reach. You can choose your method of contribution to this community based on your interests. Some of the contribution areas::

  • By Mentoring - If you have some experience contributing, you can help others get started by becoming a mentor, either online or in person.
  • To Documentation - All of the documentation for the Drupal Project is freely contributed by people all around the World, just like you.
  • Knowledge Sharing - An important way to contribute to the Drupal project is by sharing your knowledge about Drupal by writing blog posts, giving a presentation at your local Drupal Group meetup, a DrupalCamp, or a DrupalCon, becoming a trainer, etc.
  • Event Planning - By organizing or volunteering in virtual or in-person Drupal events like meetups, sprints etc.
  • By Marketing - You can work with other marketing teams around the globe to create Drupal-branded marketing and sales materials that can be shared and used by everyone selling Drupal services.
  • By contributing Modules/Themes - Collaboration on Drupal projects including modules, distributions, and themes is an integral way to contribute to the Drupal community.
Stay Connected & Updated!

• Slack

  • The Drupal community has a primary Slack workspace known simply as ‘Drupal’ -  - http://drupal.slack.com/ 
  • You will find a variety of channels for different topics, like #support, #bugsmash, #contribute, #drupal10rediness, etc.

• Blogs

  • Members of the Drupal community write blog posts about Drupal. 
  • Even YOU can be one of them!

• Social Media - Twitter, LinkedIn, etc

  • Following any Drupal-related profiles can keep you updated with all ongoing changes/events happening around Drupal.
Drupal Code of Conduct

As Drupal is a open source and our community is growing, it is imperative that we preserve the things that got us here. Here are some of the points with respect to conduct.

  • Be collaborative

As Drupal have a larger community, collaboration is the key. By working as a team, we can bring the best in the drupal platform.

  • Be respectful

As everyone makes a valuable contribution to Drupal, the community and its members treat each other with respect.

  • When we are unsure, ask for help

Nobody is perfect in Drupal, and nobody is expected to know everything in the Drupal community. Asking questions may fix many problems, so questions are encouraged.

  • Please contact your peers/slack admin if you are a victim of, or witness to, harassment, or need help with the administration of Slack.

https://www.drupal.org/dcoc is the link to the doc where you can find the code of conduct in depth.

Final Thoughts

As an organization who lives and breathes Drupal, we are always committed to giving back to the project in any way we can. If you’re looking for a trusted Drupal agency for your next project, our experts would be happy to help. Talk to us today!

Authors: Ankitha and Suresh Prabhu

Drupal Development Drupal Planet Drupal Contribution Drupal 9 Drupal 9 Module

Leave us a Comment

  Recent Blogs The Ultimate Guide to Jumpstart your Drupal Contribution Journey Image An Interview with GoodFirms: Ashirwad Shetty, Specbee’s CEO, shares the company’s insights Image Building component-based websites on Drupal using Acquia Site Studio Want to extract the maximum out of Drupal? TALK TO US Featured Success Stories

Upgrading and consolidating multiple web properties to offer a coherent digital experience for Physicians Insurance

Upgrading the web presence of IEEE Information Theory Society, the most trusted voice for advanced technology

Great Southern Homes, one of the fastest growing home builders in the United States, sees greater results with Drupal 9

View all Case Studies

Talking Drupal: Talking Drupal #361 - Drupal Credit System

1 month ago

Today we are talking about The Drupal Credit System with Matthew Tift.

www.talkingDrupal.com/361

Topics
  • What is the Drupal Credit system
  • How is credit given
  • How is credit tracked on the backend
  • What is the trickiest part of integration
  • Contributions are weighted, how is that handled
  • Why are contributions weighted
  • Are non code contributions included in the Drupal Credit system
  • How do you run analytics on the data
  • What is changing with the credit system
  • Other communities are thinking of integrating a credit system what are lessons shared
Resources Guests

Matthew Tift - matthewtift.com @matthewtift

Hosts

Nic Laflin - www.nLighteneddevelopment.com @nicxvan John Picozzi - www.epam.com @johnpicozzi Cathy Theys - @YesCT

MOTW

Entity Redirect Adds a configurable redirect after saving a node or other entity. The redirect is configurable per bundle. Also, given sufficient permissions (and presuming it is enabled for that specific content/bundle), individual users can configure their own redirects (on their profile edit page).

Matt Glaman: Drupal: cache tags for all, regardless your backend

1 month ago

Phil Karlton is quoted as having said, "There are only two hard things in Computer Science: cache invalidation and naming things." As someone who suffers horribly from the latter, I'm glad Drupal's caching APIs make the former a breeze. The long short of it is that caching of data improves performance by not having to perform the same operations multiple times after it has been done the first time until you need to re-run that operation again. It involves some storage (static variable in memory, memory backend storage, or the database.) Generally, you store the data with a given identifier for later retrieval, the actual data to be cached for later reuse, and possibly an expiration time for automatic invalidation.

#! code: Drupal 9: Creating A Minimal Content Entity

1 month ago

I have recently been looking at generating custom content entities and this lead to generating a minimal entity that would be useful on a Drupal site.

If you've ever used Drupal Console to generate a content entity, then you'll know what it generates a lot of files. There's all sorts of classes and configuration files generated that handle everything from generating lists of entities and forms for creating new entities.

This got me thinking about what are the minimal about of configuration to generate a usable content entity. This might be used to store some simple data or to attach to other entities through an entity reference. As it happens, setting up a minimal content entity takes just a single file.

First, we need to set up an interface so that we can identify the content entity within the system. The entity is called MinimalContentEntityInterface and is located in the file src/Entity/MinimalContentEntityInterface.php within a custom module (called mymodule in this case).

<?php namespace Drupal\mymodule\Entity; use Drupal\Core\Entity\ContentEntityInterface; interface MinimalContentEntityInterface extends ContentEntityInterface { }

This interface extends the ContentEntityInterface interface, which is the common interface used by all content entities in Drupal.

Next, we need to add the entity class. This is called MinimalContentEntity and is located in the file at src/Entity/MinimalContentEntity.php in the same custom module.

What we need to do in this class is add an annotation that informs Drupal of the presence of the entity. This sets the table name used to store the entity data and the entity keys we need.

We also need to create a static method called baseFieldDefinitions(), which returns the field definitions we require to create the entity.

Read more.

Droptica: How to Customize Taxonomy Terms Pages? Taxonomy Views Integrator Drupal Module

1 month 1 week ago

The standard method of managing Drupal's display mode may be too limited in some cases. If you want to efficiently create differentiated views used when listing terms or content related to the terms, you can try Layout Builder. What if, for example, the graphical interface, complexity, or genericity disqualifies this tool among the considered solutions? The Taxonomy Views Integrator (TVI) module may help here.

The Taxonomy Views Integrator Drupal module – general information

The functionality provided by Taxonomy Views Integrator allows you to create multiple views that can become part of the display modes of entire vocabularies or individual terms.

The module was created on 11 September 2009. The latest update to Drupal 7 took place on 20 September 2016, and to Drupal 8 and 9 – on 10 June 2021.

Popularity of the TVI module

As of the day of writing this article, about 25 thousand pages are using this module. The Drupal 7 version of the module is losing popularity, most likely due to the overall migration to Drupal 9. The Drupal 8 and 9 versions of the module enjoy a steady increase in the number of installations. Considering the number of available versions, the module has recently maintained its steady popularity.

 

Creators of the module

The main creator of the project is Derek Webb (derekwebb1). Kevin Quillen (kevinquillen), Michael O'Hara (mikeohara), Rich Gerdes (richgerdes), and Edouard Cunibil (DuaelFr) are also singled out on the list of maintainers.

Installation

The module doesn't require any external libraries. The TVI dependencies are limited to the Views and Taxonomy modules only, and both are available in the Drupal core.

We recommend using Composer for the installation.

$ composer require drupal/tvi What's the Taxonomy Views Integrator module for?

You can overwrite the terms in all vocabularies by using only the Views and Term modules. Taxonomy Views Integrator integrates vocabularies and terms with views in a more accessible way. By enabling this module, you can create a view in which you'll overwrite the list of terms in a specific vocabulary, additionally having full control over how the view is presented. You can just as easily attach a different view to a specific term. Thanks to this freedom, you can easily create, for example, differently looking subpages on a specific topic, which will be defined on the basis of terms.

Permissions

The module provides new permissions. Their list depends on the number of available vocabularies.

Administer taxonomy views integrator

This permission allows for managing global module settings and editing its settings in all vocabularies and terms. It's recommended that you only grant this permission to trusted roles.

Define the view override for terms in {VOCABULARY_NAME}

Granting this permission will allow you to overwrite the view used for specific terms in a given vocabulary.

Define the view override for the vocabulary {VOCABULARY_NAME}

This permission will allow you to override the view for an entire vocabulary.

Using the Taxonomy Views Integrator module

After enabling the module and granting permissions, it's time to familiarize yourself with its global settings. There are only two. The first one is Don't display a view by default; if selected, the default Taxonomy term view in the Page display mode won’t be used. The second one is Use global view override. If selected, it will allow you to override the default global view and choose the display mode.

 

You can also select views for vocabularies and terms. In both cases, the configuration form looks the same. You can choose:

  • a flag that allows you to enable overwriting,
  • a list of views from which you can select the view you are interested in and the display mode from this view,
  • the Child terms will use these settings option. If selected, all children of the vocabulary or term will use the same view in the same display mode,
  • and the Pass all arguments to views option. If selected, it'll ensure that the view will receive all arguments given in the path, such as the term identifier.

 

The TVI configuration form has been integrated with the vocabulary and term editing forms. Therefore, it's available under the address

/admin/structure/taxonomy/manage/{vocabulary_machine_name}

for vocabularies and

taxonomy/term/{term_id}/edit

for terms

Taxonomy Views Integrator Drupal module - summary

If your website requires more freedom in presenting terms and vocabularies, the Drupal Taxonomy Views Integrator module will certainly meet your expectations. The module is easy to use and requires only the basic knowledge of creating views. Full freedom also means the ability to create custom styling for the created views, which may require a more in-depth knowledge of Drupal. If your vision for your web page doesn't match the standard look of the views and integration with TVI alone isn't enough, our team dealing with developing Drupal websites will be happy to help you.

Lullabot: Lullabot Podcast: Drupal Automatic Updates—The Update

1 month 1 week ago

Keeping a Drupal site up-to-date can be tricky and time consuming. Host Matt Kleve sits down with three people in the Drupal community who have been working to make that process easier and faster.

It's been in progress for awhile, but now you might be able to start using Automatic Updates on your Drupal Site.

Opensource.com: Open source runs on non-code contributions

1 month 1 week ago
Open source runs on non-code contributions

Sometimes the hardest part of becoming an open source contributor is realizing how much you have to offer.

John E. Picozzi Thu, 08/18/2022 - 03:00

At this year's DrupalCon North America, EPAM Solution Architect John Picozzi presented a talk about the importance of non-code contribution. He talked about how everyone can...

Evolving Web: Writing an RFP for Web Development and Design

1 month 1 week ago

When you are looking for a web development and design agency for your business, issuing a request for proposal, or RFP is one way to find the best vendor.

An RFP is a document that outlines your project’s scope and details the specific skills and experience you’re looking for in an agency partner. By sharing your RFP with multiple agencies, you can compare proposals side-by-side and choose the perfect fit for your project.

Here’s everything you need to know about writing an RFP for web development and design, from crafting your project description to evaluating proposals and making your final decision.

Why you should write an RFP for web design projects

If you want to build a new website, add eCommerce functionality to an existing site, redesign an outdated website, or develop a custom web application, writing a RFP helps you present your project and goals to potential vendors.

Specifically for web design projects,  an RFP allows you to:

  •  Outline your project’s scope, including any specific features or functionality you require
  •  Share your brand guidelines, style inspiration, and examples of websites you like
  •  Provide background information on your company or organization
  •  Describe your target audience and their needs
  •  Share your budget and timeline for the project
  •  Detail the skills and experience you’re looking for in an agency partner

By issuing an RFP, you can find an agency that’s the perfect match for your project, rather than just choosing the first agency you come across. The more detailed your RFP is, the better chance you have to receive responses from vendors with the right expertise and skill set to meet your needs.

Consider the following sections when writing a persuasive, clear, and professional RFP: 

  1. RFP Overview

  2. Your Company and Business Overview

  3. Project Scope

  4. Requirements

  5. Project Timeline

  6. Selection Criteria

  7. RFP Response Format

  8. Terms and Conditions

//-->

What to include in your RFP  A RFP overview

When writing an RFP overview for web development and design projects, add the following information:

  • Background and purpose of the RFP

  • RFP Timeline: Project's schedule, including when you plan to start and finish the project, as well as any interim deadlines.

  • Question and Answer Period

  • Submission Location and Format

Your Company and Business Overview

This part is crucial since it is the first thing the vendor reads and determines whether or not they are capable or interested in taking on the project. In this section, include:

  • An overview of your company, products, and/or services

  • The primary audience for your website or web application

  • Your company's goals for the website or web application

  • A description of your company's current website or web application (if applicable)

  • Your target market/customers, 

  • Your ideal customer profile, 

  • Market trends affecting your industry, 

  • Your competitors and their websites

  • The decision-makers for this project

  • Department heads or managers who will be using the website or web application on a daily basis

  • Individuals or groups who will be providing content for the website or web application

Another key section to add about you company is the Rationale and Key Goals for the project. Why does your company need a new website or web application? Think about:

  • The business goals you hope to achieve with the project

  • The specific objectives you want the vendor to help you accomplish

  • How the website or web application will be used and who will be using it

  • What types of tasks or transactions will be performed on the website or web application

  • The success criteria for the project

Project Scope

The project scope is a description of the work that needs to be done in order for the project to be considered complete. For a web development or web design project, it is important  to be as specific as possible in order to avoid scope creep. In this section, you should include:

  • A description of the work that needs to be done

  • The deliverables you expect from the vendor

  • Any milestones or deadlines that need to be met

  • All of the features and functionality that need to be included in the website or web application

  • Any content or assets that need to be provided by your company

Requirements

Requirements are the specific features and functionality that you want the website or web application to have. For web design projects,  this would include items such as the overall look and feel, navigation, and layout. In this section, you should include:

  • A list of all the specific features and functionality you want

  • A description of the look and feel you want for the website or web application

  • Any content that needs to be included on the website or web application

  • Any third-party integrations that need to be included

Project Timeline

The project timeline is a schedule of when you plan to start and finish the project, as well as any interim deadlines. Being clear about the timeline from the beginning will help avoid any misunderstandings down the road. In this section, you should include:

  • The date you plan to start the project

  • The date you plan to launch the website or web application

  • Any interim deadlines that need to be metBudgetYour budget is one of the most important factors in deciding which vendor to choose.

Selection Criteria

The selection criteria are the factors you will use to evaluate the proposals you receive from vendors. Outlining these criteria in the RFP will help ensure that you're evaluating all of the proposals on a level playing field.  In this section, you should include:

  • The evaluation criteria you will use to evaluate proposals

  • The weight or importance of each criterion

  • The process you will use to score the proposals

  • Any other information that would be helpful for vendors to know

RFP Response Format

The RFP response format is the structure or format in which vendors should submit their proposals. This will help you avoid any confusion when reviewing the proposals. In this section, you should include:

  • The information you want vendors to include in their proposals and the format

  • The way in which you want vendors to submit their proposals (email, mail, etc.)

Terms and Conditions

The terms and conditions are the legal terms and conditions under which the vendor will perform the work. While this may be included in the contract, it's helpful to include it in the RFP as well. In this section, you should include:

  • The legal terms and conditions under which the vendor will perform the work

  • Any payment terms or schedules

  • The process for making changes to the scope of work

  • The process for resolving disputes

Finding the Best Vendors for Your Web Design Projects

When it comes to finding the best vendors for your web design projects, an RFP can be a helpful tool. By taking the time to create a well-written document, you can ensure you'll get accurate bids from vendors who are a good fit for your project.

Remember to include all the essential elements in your RFP, such as your project requirements, timeline, budget, etc. With a little effort, you can find the perfect vendor for your web design project. 

//-->

+ more awesome articles by Evolving Web

Community Working Group posts: Code of Conduct team update: August 10, 2022

1 month 1 week ago

As previously reported, the Community Health Team has started to have regular, bi-weekly meetings in an effort to develop and update the Code of Conduct (CoC) for the Drupal community. This week's meeting was our sixth consecutive bi-weekly meeting.

Community Health Team members present at this week's meeting were

During the past several months, the committee has been focused on researching Codes of Conduct in general, as well as parsing various CoCs in order to develop a list of potential CoC elements for the next evolution of the Drupal Community CoC.

During this week's meeting, the team members voted on elements we found in various CoCs (including the Drupal CoC) to place each element into one of the following three groups in the form of a bullet diagram: "must have", "should have", and "nice to have".

The CoCs that we pulled elements from include: the Drupal community, the Contributor Covenant, A11ytalks, Enspiral, Django, and Fedora. Over the next few days, committee members will also review the Ubuntu 2.0, Learn WordPress, and Decoupled Days CoCs for any additional elements that we may have missed.

George DeMet will transform the bullet diagram into an outline, with sample language pulled from the original source for each element. This document will be shared with our community stakeholders for feedback. Feedback from community stakeholders will be required by August 24 so that we can remain on schedule to review community stakeholder feedback during our next meeting on August 24.

A number of Drupal-related groups and individuals have confirmed their willingness to provide feedback to this effort as the process proceeds. If you, or a Drupal-related group, is interested in being part of this process as a community stakeholder, please let us know at drupal-cwg at drupal dot org.

Web Wash: How to Add Noindex to Pages using Metatag in Drupal

1 month 1 week ago

Often on a website, you want to control what pages are displayed in search results. You can do this by adding the noindex meta tag to pages. I’m not going to cover why you would want some pages not to appear in the search results; however, I want to show you how to implement it in Drupal.

This tutorial will teach you how to use the Metatag module to control the noindex meta tag.

If you want to learn more about Metatag, read our tutorial “Getting Started with Metatag in Drupal”.

ImageX: Adding Social Media Buttons to Drupal: Everything you need to know

1 month 1 week ago
Social media integration is paramount for increasing your brand reach. It enables your website to work in tandem with social media platforms that will host a forecasted 4.59 billion users in 2022.  Social platforms enable you to enable prospects to interact with your brand authentically. Adding social platform buttons and widgets to your website can help your presence reach its fullest potential. Here are just a few examples of how your website and social media profiles can work as an efficient team:
Checked
19 minutes 52 seconds ago
Drupal.org - aggregated feeds in category Planet Drupal
Subscribe to Drupal Planet feed