How we work with Drupal at Axelerant #

We are Drupal experts, but we can belong from different backgrounds. At Axelerant, we follow some set of tools and approaches. They might not be perfect. Your opinions are valued here.

Set up

Doing the local setup #

Setting up a new site #

We prefer ddev for the local setup due to its compatibility with Apple chips.

Setting up an existing site #

Most probably the setup will contain either lando or ddev. Make sure you have the respective tool installed on your machine. Then, execute the tool’s start command.

Information architecture

Information Architecture #

Choosing the right architecture will help you in the long run. While an incorrect architecture will become costly. Consult with your peers while deciding the architecture.

Selecting the field types #

You want to store numbers. Is the input always going to be a number? Is it going to be a currency? Do you want to show thousand and decimal markers? Understanding the requirement will help with the correct field type.

Layouts

Planning the layout #

You want to plan the layout of the home page. The customer has provided the design. Do you want to make it flexible using the layout builder? Or the simplicity of paragraphs would be sufficient here? Understanding the requirement and tradeoffs will help you with the correct layout architecture.

Configuration management

Configuration Management #

Configuration as Code is one of the basic requirements in Drupal. We must be aware of what to include and what to exclude in the configurations.

Configuration per instance #

The production should not have views_ui and field_ui modules installed. The development instance should have that installed. We consider using config_split in this situation.

Ignoring configurations #

There is a configuration that we want to ignore whenever we are exporting configurations from our setup. Use config_ignore.

Coding

Coding #

At Axelerant, we prefer using community modules. But sadly, that doesn’t always meet the requirements.

Double check #

We need to make sure the module doesn’t have a setting that will meet the requirement. They are sometimes hidden and not mentioned in the README.

Hybrid approach #

Can the work be reduced by using a community module? It is effective because the module will do the heavy lifting. It reduces the scope of tests as well.

Debugging

Finding out the culprit #

You are free to choose the tool to find out the problem. Not to mention that it must identify the problem within the deadline.

We recommend using xdebug to find the issue. It is effective in situations when you are not able to print the variables on the page. Like, in the case of AJAX callbacks. We understand that it doesn’t work out of the box and needs an IDE setup. We believe it is worth investing time to do the setup because it pays out well in the long run.

Drupal SEO

Drupal SEO #

We configure sites that are optimized for SEO, which improves their visibility on search engines like Google.

One of the major options for implementing SEO is the use of specific modules that can enhance a site’s search engine performance. For instance, the XML Sitemap module creates a map of your site that helps search engines understand its structure and efficiently crawl through its pages. The Google Analytics module integrates our site with Google’s analytics tool, providing valuable insights into how visitors interact with our site. The Metatag module allows us to add meta tags to our site, which are snippets of text that describe a page’s content and can influence how your website is understood and displayed by search engines.