New Wave Drupal Module Architecture

- Private group -

Note: This, and other lab sessions, will not be recorded.

Drupal traditionally has a number of characteristic development practices which make it unique in its architecture and also frustratingly strange in implementation. Drupal 8 made it possible to do away with many of these approaches yet the community has not completely embraced these new options yet. Come see a practical example of moving a module away from both well understood Drupalisms as well as a number of “code smell” issues and on to a well structured, easy to understand architecture.

In order to illustrate this we’ll dissect Acquia’s ContentHub module by comparing the 8.x-1.x branch and the 8.x-2.x branch. We’ll evaluate how this module solved common problems with well known Drupalisms in the 8.x-1.x branch and how fully embracing Symfony components in 8.x-2.x allowed for a cleaner, more easily understood architecture. We’ll investigate how developer documentation immediately benefited from this approach and what other options were available but discarded for various reason.

This session will focus largely on:

  • Traditional Drupal hooks and alters

  • Drupal 8’s Plugin System

  • Symfony’s Event Dispatching & Subscribing system

In addition to these elements, the session will largely focus on different uses of event subscribers including:

  • Settings collection

  • Replacing traditional Drupal hooks

  • Replacing traditional Drupal alters

  • When to use Event Subscribers vs Plugins

  • Some really cool code examples

 

Program tags

apis, back end development, php

Program track

builder

Experience Level

Advanced

Drupal Version

When & Where

Time: 
Wednesday, 10 April, 2019 - 16:00 to 17:30
Room: 
615 | Level 6