Drupal Planet

#! code: Drupal 9: Generating Header Images For Pages Of Content Using PHP

3 weeks 2 days ago

Embedding image within pages of content helps both within the design of the page and when shared on social media. If you set up meta tags to point at a particular image then that image will appear when the page is shared on social media. This makes your page stand out more.

A while ago I added a header image to the articles in the form of a field that references a media item, which is quite typical when adding images to pages. To add an header image to an article I just had to upload an image and Drupal would handle the size, placement and meta data for that image.

With the field in place, however, I spent a while adding a default header image to new articles so I haven't been making good use of it. My GIMP skills aren't that amazing and so the prospect writing an article and spending time fiddling with text elements on an image every week wasn't that appealing.

I decided that rather than spend time hand crafting an image for the header, I would automate the process as much as possible. To this end I set about writing the components that would allow me to automatically inject a generated header image using Drupal services. I thought that the setup of this functionality would make a good article itself.

In this article I will briefly touch upon creating images using PHP and how to inject those images into a media reference field on a node using a form in a local task.

Creating An Image Using PHP

This is a big topic so I'm not going to cover everything here, but I thought an introduction into how I created the header image might be of interest to readers. I'll be using the PHP GD library functions here as they are pretty easy to use and are normally installed on most PHP platforms.

Read more.

Drupal.org blog: What’s new on Drupal.org - Q2 2022

3 weeks 4 days ago

Read our roadmap to understand how this work falls into priorities set by the Drupal Association with direction and collaboration from the Board and community. You can also review the Drupal project roadmap.

We kicked off Q2 by getting back to our first in-person DrupalCon in several years. For those of you who were able to join us in Portland, I hope you enjoyed an event that felt like a true community homecoming. And I hope you're thinking of joining us for DrupalCon Prague in a few weeks.

If you missed the event, it's not too late to catch up on some of the excitement. You can review the Drupal.org update panel where we talk about the engineering work we're doing in support of the community. You can also read our recap blog, which includes some excellent highlights, as well as a link to the #Driesnote and some other amazing content from the event. 

At the time of this writing we're only a few weeks away from DrupalCon Prague 2022, where you can join us to see where this work has gone since Portland! 

Drupal.org Improvements GitLab Acceleration

One of our key milestones in the GitLab acceleration initiative is moving project testing from DrupalCI to GitLabCI. In the second quarter of 2022 we focused on engaging community volunteers to help us understand their needs and the best strategy for this transition process. 

GitLabCI is going to provide more flexible testing options, and put more control in the hands of maintainers.

But even as we give the community more tools, we need to make sure we manage our testing budget carefully, and maximize the resources provided by our members and supporters. 

We have approximately 20 contrib projects who have opted in to help us test the tools, but before we roll this out to every project, we're working with the GitLab team to add per-project CI limits. A merge request is in progress! 

At DrupalCon Prague we're going to be previewing the next phase of this project - the migration of Drupal.org issues to GitLab issues! 

Secure signing for Automatic Updates

Together with our implementation partners at Consensus Enterprises, the Rugged TUF project has launched. 

We're now standing up the infrastructure to host this signing server and integrate it with Drupal.org's packaging pipeline.

This effort to provide secure signing for php packages has seen collaboration across the Cloud Native Computing Foundation, TUF, OpenSSF, Drupal, Typo3, Joomla, and others. 

Once in production, the Automatic Updates initiative will be able to enable fully unattended automatic updates. 

If you or your organization is interested in supporting supply chain security for the PHP ecosystem, consider reaching out to: [email protected]

Drupal.org Sub-site updates

Drupal.org is not only the home of the community and the source of key tools for contribution, but it is also in and of itself a showcase of what Drupal can do. 

Making sure that each of our properties is on the latest and greatest version of Drupal is part of showing of the power of Drupal. 

In parallel with our development tooling initiatives, we've also been working on upgrades to some of the drupal.org subsites. Api.Drupal.org and Events.Drupal.org have both had significant overhauls - to be launched before the end of the year. The community has also made massive progress on localize.drupal.org. 

We want to give thanks to our partners at SixEleven, as well as the community contributors who helped migrate Drupal.org's Bluecheese theme to Drupal 9. 

Packaging Upgrades

Something many community members may not know is how much infrastructure is involved in each new release of Drupal. 

Cutting a new release of Drupal Core involves running the CI suite against multiple environments, as well as packaging releases for multiple supported branches with their composer dependencies.

In Q2 we optimized the order of packaging operations, and the dependency resolution steps to improve packaging performance and prepare for integrating the signing process for automatic updates. 

Release packaging is a behind the scenes element of managing the Drupal project, where there is a very close collaboration between the Drupal core release managers and Drupal Association staff.

Making this process as efficient as possible reaps benefits for our regular releases, and is also crucial for security release windows when we often need to make multiple versions available in quick succession. 

Publishing non-Drupal PHP projects to Packagist

Fairly recently Drupal.org added a 'general project' content type. 

This was for submitting projects/libraries that aren't traditional Drupal extensions, but are still relevant to Drupal, such as Javascript libraries, Drush extensions, or PHP libraries. 

Drupal.org now publishes these more general PHP libraries to packagist when relevant. 

This capability is important as we build more generic components that can be used within Drupal and to bridge Drupal with other technologies.

It's also important to the new 'starter kit' initiative where we want to publish 'recipes' directly to Packagist, that will install Drupal with a predefined stack of extensions and configuration. 

More features for organizing community events

Drupal.org/community/events allows anyone in the Drupal ecosystem to submit their Camp, Training, Contribution Event, etc. 

Working closely with the Events Organizer Working Group we've made a variety of improvements to this community event portal, including filtering and categories, improvements to the map, etc.

Especially as we come out of the pandemic - revitalizing these community events is going to be a key part of Drupal's growth.

Drupal has always been made up of these grass-roots meet-ups, and regional events, and then culminating as people come together at DrupalCon. 

User Database Clean-up prior to SSO solution launch

Drupal.org will shortly be implementing a new Single-Sign-On solution based on Keycloak.

As a precursor to this change, we need to do some maintenance and clean up to our user database. We've had a continues Drupal user table for nearly 20 years, and we've had to rationalize some data to fit the model for the new SSO solution.

A new SSO solution is part of our Drupal.org D9 upgrade strategy, but also gives us new tools to use to accommodate third-party services the community might want to use - such as new chat services, or even using Drupal.org identity for camp websites. 

Membership system migration

We've upgraded the Drupal Association's individual membership management system, and are now using Classy, a non-profit membership tool suite. This provides greater integration with Salesforce, and some new options for membership campaigns. 

Improvements to our individual membership system are part of the road to greater recognition of individual partners, and to connect the dots between the individual contributors and the organizational partners they work for. 

Drupal Steward invoicing improvements 

Are you a Drupal Steward customer? 

Drupal Steward is a web application firewall used by the DA and security team to provide protection for customer sites in the event of highly critical releases.

In Q2 we updated the invoicing format to better accommodate the common requirements of finance departments, making it easier for agencies and end-users to manage their Steward participation.

Drupal Steward is both a tool to provide peace of mind to site owners, and a tool to give agency teams more time to respond to a newly released highly critical update. 

More options for understanding organization contribution history

We know many organizations are passionate about their contributions to Drupal.

That's why we've added more filters to the 'all credit view' on each organization profile, to make it easier to understand an organization's contribution history over time. 

Contribution is the lifeblood of the project, and we want to equip organizations with all the tools they need to be successful.

We have another big improvement for organizational credit coming at the end of Q3, so keep an eye out! 

See you in Prague!

Members of the Drupal Association engineering team will be on the ground at DrupalCon Prague from September 20-23 of this year. There's still time to join us and chat about these and other updates on the horizon. We'd love to see you there!

———

As always, we’d like to thank all the volunteers who work with us and the Drupal Association Supporters who make it possible for us to work on these projects. In particular, we want to thank: 

If you would like to support our work as an individual or an organization, consider becoming a member of the Drupal Association

Follow us on Twitter for regular updates: @drupal_org, @drupal_infra

Sooper Drupal Themes: DXPR Builder 2.0.0-rc1 is now available as free download on Drupal.org

3 weeks 4 days ago

We are excited to announce that the release of DXPR Builder backend code on Drupal.org. With this step DXPR shows its commitment to the open source business model. While we still monetize our visual page building experience, with our new business model you no longer pay per site, only per user. Moreover you only pay as long as you need the DXPR Builder editor.

If your website no longer requires the visual editor the paid subscription can be stopped and all features related to viewing content will keep working.

Open source digital content

All of the source code that is related to "viewing" content created with DXPR Builder is committed to our Drupal.org repository. This means that your content is not depending on a paid subscription. It's just the visual editing experience that you're paying for.

At the same time we also introduce a "free plan" that allows small websites to use DXPR Builder without a paid subscription with no limitations on features or time. The limitation for a free account is that it supports 1 User license per website and let's you edit up to 20 content items per website with DXPR Builder.  

Steaming aheard towards September 14 2.0.0 production release

While all features are fully functional in our release candidate we are still working hard on refining and improving our live editing widgets. The transation from DXPR Builder 1.x to 2.x mainly introduces live editing and a new sidebar window that replaces the old "square window". 

Along with the layout and settings widget changes we're implementing many productivity improvements inside the editor. In the picture above you can see our improved box model editor which introduces mousedrag based changes to margin and padding values.

Drupal 10 compatibility from launch

At the time we release DXPR Builder 2.0.0 we plan to have full compatibity with Drupal 10.0.0-beta1 which is scheduled to come out September 11th. Our next step will be to provide new demo websites with default content based on Drupal 10!

Drupal Association blog: Meet the 2022-2023 Discover Drupal Student Cohort! 

3 weeks 5 days ago

Discover Drupal’s second program year has gotten off to a great start. We’ve welcomed eight incredible students, and we are so excited to help support them in their Drupal journeys. Classes began this week for Drupal Career Online, and next week for Evolving Web, so we thought this would be the perfect time to introduce you to them! 

Cindy L. Garcia (she/her)

Cindy is from Miami, FL. She is a WordPress web developer. Her Drupal ID is cindy_codediaries. Her goals are to become a full-stack Drupal developer and contribute to the Drupal community. In her free time, she likes to work out and do Javascript coding challenges. Her favorite piece of technology is her Macbook. Life isn't the same without it!

What does being a Discover Drupal student mean to you? 

“Being a Discover Drupal student would help me further explore web technologies and reach my goal of becoming a full stack developer.”

What are you most excited about in the program?

“What excites me the most about the program is going to DrupalCon 2023 and connecting with other Drupal developers in the community.”

Anastasiya Kazakova (she/her)

Anastasiya lives in Medford, Massachusetts, with her 8-year-old daughter. She is originally from Moscow, Russia. She has worked as a multimedia designer at Tufts University for the last few years. She received a BS in Business Management from Moscow Open State University in Russia and a Master of Science in Digital Design from Philadelphia University. Over the years, she has worked on various projects, including digital and graphical story-telling, newsletter design, event photography, and media presentations. The atmosphere of learning, sharing knowledge, and researching has always inspired her.

She has always dreamed of working on projects where art and technology merge. She wants to work on making art more interactive and accessible and technology more ergonomic, accessible, and human-friendly. She is inspired by exhibits such as Gustav Klimt: The Immersive Experience and Gestural interfaces (Blue Cadet).

She enjoys hiking, nature, yoga, and sketching.

What does being a Discover Drupal student mean to you? 

“Discover Drupal means an opportunity for me to move deeper into development, understanding the building blocks of a compelling and community-strong technology.”

What are you most excited about in the program?

“Moving forward professionally and achieving my dreams.”

AV Lee-A-Yong (ze/hir)

Originally from Miami, FL, AV is currently based in Philadelphia, working in the nonprofit sector. A recent graduate from Swarthmore College, ze majored in Peace and Conflict Studies, with minors in Psychology and Gender & Sexuality Studies. In hir free time, AV loves to play video games, cook Trini food, and play with hir dog, Kirk. AV's favorite piece of technology to date is the James Webb telescope!

What does being a Discover Drupal student mean to you? 

“Being a Discover Drupal student means that I am able to get a chance to start a new career, to find a new community, and to learn new skills along the way.”

What are you most excited about in the program?

“I am most excited to enter into the Drupal community with a support network through this program, and to learn and grow alongside my cohort members!”

Selvin Sahn (he/him)

Selvin is currently based in the Twin Cities and his goals are to learn every bit about Drupal in this program,  become a good Drupal developer, and share his knowledge by contributing to the Drupal community. He is a software engineer who loves to embrace emerging technologies. If he is not playing soccer or video games with friends in his free time, he will be biking or making some delicious dishes or looking over some tech stuff. His favorite piece of technology has always been the iPhone–just can’t stop loving the sleek design and lovely features.

What does being a Discover Drupal student mean to you? 

“Being a Discover Drupal student means a lot to me. It means I am given the opportunity to learn advanced skills in Drupal, one of the world's largest CMS ecosystems. It means working hard to learn and become good at what I am learning.”

What are you most excited about in the program?

“I am most excited about the diversity. I am also excited about the 1-on-1 mentor and of course the program itself--learning Drupal.”

Haroms Terfassa (he/him)

Haroms is from Burnsville MN and one of his goals is to be able to secure a full time job after finishing the program. He would also like to establish long lasting connections within the program. His professional background includes working at Chick-fil-A from 2018 - 2019 and Domino's from 2021 - present time. He likes to video edit and play video games. He also loves to spend time with family and friends. Being Oromo is an important identity of his as he was raised to always be proud to be who he is. His favorite piece of technology would have to be the Quest 2 because of how well it can run without needing a computer for support.

What does being a Discover Drupal student mean to you? 

“Being a Discover Drupal student to me means someone who is eager to learn and ready to build the skills needed to traverse through the tech industry.”

What are you most excited about in the program?

“I'm excited to acquire more knowledge about web building and creating new relationships here at Drupal!”

Brigitte Ayerves Valderas (she/her)

Brigitte Ayerves Valderas is from Columbia, Maryland.  She's making a career transition into web development after working for several years in the fields of communications and marketing. She has worked mostly in the industries of technology, healthcare, and education improving website content and the user experience, developing communication and marketing strategies, and writing, producing and reporting local, national, and international news. When she's not working she loves to read, travel, hike, and spend time with loved ones. Her favorite piece of technology is her smartwatch because it helps her to stay fit and track her routines.

What does being a Discover Drupal student mean to you? 

“I am excited about the Discover Drupal program because it means an opportunity to be more active in digital environments. I've worked on so many Enterprise websites I finally get to master the one that I come across the most: Drupal.”

What are you most excited about in the program?

“Learning Drupal, the Drupal community, and participating in community events.”

Ajani Walden (he/they)

Ajani is a Social & Communications Coordinator from Brooklyn, NY. He’s a Black, Queer, Trans advocate and tech enthusiast. He loves sharks, tech, and helping others. His professional background has been working in the non-profit sector for the last 10 years. He hopes to bring those skills over to the tech industry. His favorite piece of tech would be his cell phone.

What does being a Discover Drupal student mean to you? 

“It means I have a chance to learn something new and exciting. This program can change my life. I look forward to this next journey of life as a student.” 

What are you most excited about in the program?

“Building a website and learning about new technology.” 

Thank you so much to all of our students for their trust, vulnerability, and commitment. We hope you will join us in celebrating them and supporting their growth and success in Drupal! 

* Public features of our Discover Drupal students are voluntary, and not a requirement to participate in the program. Not all students consent to being featured publicly, and we respect our students’ right to privacy. *

Centarro: Commerce Core 2.31 (and more!) features in review

4 weeks ago

We've packaged three releases of Commerce Core this year, from the 2.29 release in February to this month's 2.31 release. While DrupalCon, Kickstart development, and client launches have kept us busy, we wanted to take the opportunity to share the good news while we take a breather before DrupalCon Prague.

Each release includes general maintenance and modernization work, improving PHP 8.1 and Drupal 10 support while keeping up with tax rate changes around the world. They also include a variety of minor bug fixes and enhancements, like database indexes to improve performance or new permissions to support finer grained store management. Altogether, we've seen 87 issues resolved by dozens of contributors.

In this blog post, we'll review the more significant new features, including for BOGO promotions, product display pages, and order management.

"Buy One Get One" promotions

Commerce Core 2.x has always included BOGO promotion support, including the ability to adjust the quantities (which is why we call it "Buy X, Get Y" in the UI) and fine tune other rules around applicability. Thanks to a variety of merchants pushing the limits of what core can do, we found fixed a few bugs and found ways to improve the feature. In particular, we've ensured that:

Read more

DrupalEasy: Are cheatsheets still a thing for Drupal developers?

4 weeks ago

Over the past couple of weeks, I've been looking for Drupal-related cheatsheets for developers. I went through my old notes, asked students and alumni of Drupal Career Online, and posed the question on both Twitter and LinkedIn. While I did receive some feedback, I'm starting to get the feeling that cheatsheets aren't really used all that often for neither new or experienced developers.  This is a bit of a shame, since they can be so useful. 

In the past, I would have defined a cheatsheet as something that one could print out on a single page of standard paper (and perhaps even laminate it!) Over the past couple of years, my personal definition of a cheatsheet has evolved into something like this: a short reference guide on a particular topic that only serves as a reminder of functionality, not an explainer. 

My own personal experience with cheatsheets over the past couple of years has mainly been limited to this Composer Cheat Sheet for Developers - a fast, interactive reference for all/most of the Composer functionality that I currently need. I also have the Twig Tweaks module cheatsheet handy - for the rare occurrences where I'm deep enough in front-end work where it is required. I suspect folks that do Drupal front-end development regularly will find it very useful. 

I was reminded of this excellent Drupal Entity API cheatsheet written by Keith Dechant: It was posted in November 2017 and as far as I can tell is still all (mostly?) relevant. For those of us who are back-end Drupal developers, it is definitely worth a look. Thanks to Martin Anderson-Clutz for the reminder!

The thing that actually started me thinking about cheatsheets was Drupal's Form API, and how there doesn't appear to be a single page reference on Drupal.org that shows all the various element types and available properties. To me, this seems like a great exercise for someone looking for a documentation credit. This article by the folks at Drupalize.me is the closest I could find. IMHO, a cheatsheet for Form API elements would be very useful. 

Another Drupal-adjacent cheatsheet that I would whole-heartedly welcome into my development process would be one for Flexbox. I'm quite confident that something like this exists out in the wilds of the internet that I'm just not aware of. In the meantime, this Complete Guide to Flexbox from CSS-Tricks has been my go-to, even if it doesn't fit my definition of a cheatsheet. 

Finally, Emmons Michael Patzer, in a comment on LinkedIn, pointed me in the direction of Cheatography - a bit of a repository of various web technology cheatsheets.

Are there any other useful, up-to-date Drupal-related cheatsheets out there? If so, I'd love to hear about them!

The pixel art image used in this blog post was generated by the DALL-E project of OpenAI.

Talking Drupal: Talking Drupal #362 - Progressive Web Apps

4 weeks 1 day ago

Today we are talking about Progressive Web Apps with Alex Borsody and Wilfred Arambhan.

www.talkingDrupal.com/362

Topics
  • What are Progressive Web Apps (PWAs)
  • How is a PWA different from a native app or cross platform app
  • What features point towards a PWA
  • What features are difficult to implement
  • Where do they store their data
  • What are some use cases
  • What does the PWA module do
  • Why would you use the PWA module
  • Potential enhancements to the PWA module
  • Google’s Plans
  • Security
Resources Guests

Alex Borsody - @alexborsody Wilfred Arambhan - @wilfredarambhan

Hosts

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

MOTW

Responsive Tables Filter It makes the following tables responsive:

  • Any tables within fields where Drupal text format filters can be applied
  • Views tables

Acquia Developer Portal Blog: Drupal: cache tags for all, regardless your backend

1 month ago

This blog has been re-posted and edited with permission from Matt Glaman's blog.

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.

Acquia Developer Portal Blog: 10 Drush Commands for Acquia CMS

1 month ago

Drush - The "drush" command is very useful for accessing and manipulating your website's settings and data from the command line.

If you are new to Drush, you might find the large number of commands available overwhelming and not know which ones to start with.

1. watchdog-show (ws)- Show a listing of most recent 10 log messages.

drush watchdog-show

2. pm-list (pml)- Show a list of available extensions (modules and themes )

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

1 month ago

As previously reported, a Code of Conduct committee of 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 seventh consecutive bi-weekly meeting.

Members present were:

We sent out a "Revised Code of Conduct Elements" Google Doc for review to six volunteer stakeholders on August 18. All six people responded by adding comments and suggestions in the Google Doc. We failed to contact two stakeholders; we have since corrected this and extended the deadline until September 1 for those two stakeholders. We identified additional community stakeholders that we will invite to this review process, focusing on non-North American and non-Western European community members.

The document was composed of various elements and example text based on the team's review of various other community Codes of Conducts over the past several months. It was divided into "must have", "should have" and "nice to have" sections based on the committee's previous research and discussion.

Stakeholder feedback was reviewed by the team and each suggestion and comment was discussed and acted on. Topics included (but not limited to) the paradox of tolerance, the use of easy-to-read English, examples of acceptable and unacceptable behavior,

Feedback from community stakeholders received included:

Looking at those who have commented so far, we need to reach out further than just US and the very western edge of Europe for input on this.

In many communities of color, 'civility' is a term that lets us know that space might be racist. I know that isn't the intention here, so I would suggest revising this language to something like 'Centering mutual respect in your interactions with others' or just removing it altogether since you have captured the same sentiment in many places here.

We should also note here that the CoC itself should be written in easy to read English

I would suggest including a caveat [...] that states: 'and especially those most vulnerable' or something similar to avoid the paradox of tolerance.

Our goal is to have an initial draft of a revised Code of Conduct by September 7 - work will proceed in the next two weeks towards that goal.

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.

Golems GABB: Tokens in Drupal: how they work and what they can give your website

1 month ago
Tokens in Drupal: how they work and what they can give your website Editor Fri, 08/26/2022 - 15:16

Our every morning starts with coffee. This day will be no exception. Pour yourself a hot espresso or teacup, and let's explore tokens in Drupal with us. What is a Drupal token, how do they work, and what can they give your website?
If you need help activating your Drupal token, please refer to the Drupal 8 services page. Honestly, it's not that easy to do if you're not a developer. Try to do it yourself, but if you need help, you have someone you can turn to!

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
Checked
2 hours 58 minutes ago
Drupal.org - aggregated feeds in category Planet Drupal
Subscribe to Drupal Planet feed