Today, we're happy to announce a new free series about Drupal Coding Standards that has been made possible by our friends at Chromatic. This series was originally written by Alanna Burke, who is a developer at Chromatic, and they have generously released the work under a Creative Commons Attribution-ShareAlike 4.0 International License so that we can share it here, with some modifications, and keep the information up to date as it changes.
Chromatic is a well-recognized agency in the Drupal space, providing design and development services to some of the biggest brands in publishing, media, and e-commerce. Chromatic has 10+ years of experience working on large, enterprise Drupal sites. This series is a testament not only to Chromatic's commitment to building Drupal sites the right way, but sharing that information with the open source community. We're very grateful for their enthusiasm to share their knowledge with the Drupal community.
Learn about coding standards
The Drupal community has defined a set of coding standards and best practices that you should adhere to whenever you're writing code for Drupal. These standards provide a set of rules for how your code should be formatted, and best practice guidelines for naming conventions and the location of files. This ensures consistency in code throughout the project and makes it easy for developers to move around from one subsection to another without having to relearn how to read the code.
The tutorials in this series will walk you through the following topics:
- What Are Drupal Code Standards?
- Drupal Code Standards: Formatting
- Drupal Code Standards: Documentation
- Drupal Code Standards: Object-Oriented Programming
- Drupal Code Standards: The t() Function
- Drupal Code Standards: Twig
- How to Implement Drupal Code Standards
For more resources about Drupal standards, also check out our Drupal Coding Standards topic page.