Drupal 8 Module of the Week Recap: Honeypot, Drupal Console and Coder
by Reena Leone
More and more modules continue to be migrated over from Drupal 7 to Drupal 8. This time we’re looking at Honeypot, Drupal Console, and Coder. Technically, only one of these is a true module but the others represent significant contributions to the Drupal community and are important enough to Drupal 8 to be profiled on the Acquia Developer Center.
What Does Honeypot Do?
“Honeypot is a valuable module to help prevent spammers from submitting forms on Drupal sites. It is currently in use on more than 68,000 websites. It's a little different than most other antispam modules because it doesn’t harm the user experience on the forms; it doesn’t make you decrypt distorted text or do math to submit the form, for example. Instead, Honeypot uses a couple of hidden form fields to determine whether the submission comes from a spambot or a real human and blocks the bots.”
Why Does It Matter?
“Honeypot is one of the simplest and most effective anti-spam modules for Drupal, and it doesn't require any external service integrations. It also has an extremely simple API that allows developers to customize its rules in case spammers are more persistent.
Almost every website that allows user interaction or content submission has to deal with form spam. If you have a form on your website or you allow user registration, chances are you've been overwhelmed by spam accounts and postings at one point or another.”
Maintainers: Eduardo García (enzo), CTO at AnexusIT, Jesús Manuel Olivas (jmolivas), Drupal 8 Solutions Engineer at FFW, Omar Aguirre (omers), Drupal Developer at Axtel, and David Flores (dmouse), Tech Lead at Indava.
What Does Drupal Console Do?
“Drupal Console is not a Drupal module per se, but rather a Symfony application that offers a lot to developers working on Drupal 8 projects.
Drupal Console is a command line interface (CLI) tool that helps you as a developer by helping you with Drupal 8 code: generating boilerplate code (aka the basic “scaffolding” you need for every module you write), and interacting with and debugging Drupal 8 code. Drupal Console also lets you download and install modules; create dummy data, tests, and database logs; and debug not just registered services, but also various D8 subsystems like the configuration, routing, and state subsystems--all via the command line."
Why Does it Matter?
“Drupal Console has been designed to increase Drupal developer productivity by helping generate code immediately. Because the Drupal Console takes care of the necessary boilerplate code and other basic functionality, you can focus your effort on the business logic of your application--the part that delivers value to your organization.”
Maintainer: Klaus Purer (klausi on Drupal.org). He does backend development, Drupal architecture, and Devops at epiqo. He’s also a member of the Drupal Security Team and a Code Review Administrator on Drupal.org.
What Does Coder Do?
"Coder is not a module anymore. It is a PHP command line tool that can be installed with Composer to automatically find and fix coding standard violations in your Drupal code. This is important because now you can easily integrate it into your automated testing process and flag errors when a changeset introduces coding standard errors (another example of this is in the Rules Project test configuration). There are also plans to include Coder into the automated patch testing on Drupal.org.”
Why Does it Matter?
Klaus explains, “In order to better understand and read code faster, it is important that collaborating developers settle on a common set of standards for how they write code and what that code should look like. Drupal has its own coding standards and Coder is the implementation of those standards. When you’re writing code, Coder points out any style issues and can even fix most of them automatically for you so you don't have to guess if a piece of code is coding standards compliant. Coder can also integrate into your IDE or editor so that you get coding standard warnings while you write code.”
Is there a Drupal 8 module you’d like to see profiled? Let us know in the comments!