Code-Driven Development: an Effective Drupal Workflow, from D7 to D8

Register

In a full-day training aimed at Drupal developers we will show how to improve the Drupal development workflow, especially regarding traceability of changes, smooth upgrade of production sites and distributed team workflow, by using code-driven development techniques and Features. The course is D8-ready: we will assume familiarity with Drupal 7 (and with a workflow based on code versioning and database dumps) but present the concepts both in their Drupal 7 and Drupal 8 version, to give full coverage.

We will briefly recap the benefits of the Features module before moving to the more advanced topics of achieving a solid, clean, efficient and sustainable workflow with Drush Make and installation profiles. We will then discuss how the Configuration Management Initiative changed the landscape in D8 by integrating some of these concepts in Drupal core, and how to make the most out of it.

We will see:

  • how to put the whole site configuration in code in Drupal 7 and how to use the Configuration Management functionality in D8;
  • how to safely manage site updates with virtually no downtime;
  • tips to deploy faster by using Drush and an optimal shell configuration;
  • how to reuse configuration elements;
  • how to automate a large part of the Drupal development process.

Trainees will be given access to dedicated development resources for hands-on activities, and will receive printed course materials, including handouts and a "Code-driven development cheat sheet" containing synopsis and description of all the Drush commands and command-line utilities shown, as well as a list of "do's and don'ts" in code-driven development and tables with the structure to use for .info files, .install files and field/views naming conventions.

Course Objectives

Participants will improve their Drupal 7 development workflow and be immediately ready for Drupal 8, by learning how to:

  • Keep track of all changes to a website
  • Work in a distributed team with no risks of overlapping during development
  • Reuse components and settings
  • Update production sites cleanly
Pre-requisites: 

It is recommended that students bring their laptops to class. Trainers will take care of executing practical tasks slowly enough for everybody to understand without the need for students to replicate actions on their laptop. Those students who already have a good familiarity with Drupal development and a local developent enviroment ready may replicate the exercises on their laptops during the training. All code will anyway be distributed to students so that it can be kept for future reference.

Agenda: 

The course is divided in 7 modules. Each module will be structured as a 15-20 minutes presentation with slides, a brief session for general discussion/questions (10-15 minutes) and an assisted practical assignment (25-35 minutes) covering both the Drupal 7 and Drupal 8 perspective.

The Power of Code-Driven Development

  • Code, configuration and content
  • Issues in distributed development
  • Issues in upgrading a production site
  • Database dumps and their shortcomings
  • CMI: Drupal 8 goes code-driven
  • Faster development with Drush

Basic Work with Features

  • The Features module
  • Creating a Feature
  • Maintaining a Feature
  • A closer look at the Features engine
  • CMI: a part of Features goes to D8 core

Modularity: Working with Multiple Features

  • An efficient directory structure
  • Features boundaries
  • Avoiding transversal Features
  • Naming conventions: Kit
  • The concept of modularity in D8

Making Configuration Exportable

  • Items exportable out of the box
  • Direct integration: the Features API
  • The CTools module: exportables
  • The Entity API
  • Example: the Strongarm module

Project Bootstrap

  • Managing every site as a distribution
  • Makefiles and Drush Make
  • Installation profiles and their customization
  • Hard and soft configuration

The Code-Driven Workflow

  • Updating Features as modules
  • Updating sites/distributions using the install profile
  • Handling concurrent developments on the same site
  • Structural and incremental updates

Advanced topics and guided examples

  • Building truly modular features
  • Features inheritance
  • Overriding existing Features
  • Deploying a Features server
Target Audience: 

The target audience is Drupal 7 developers who want to improve their development workflow and be ready to optimally exploit Drupal 8 in new projects.

Meet the Trainers: 

The trainers, Andrea and Antonio, are co-founders of Nuvole and have a long Drupal experience, especially with large projects for international organizations. Their Drupal development techniques have always been focused on adopting a clean workflow and automating most development steps through what they called "Code-Driven Development" back in 2010.

The course has become a regular "advanced training" at DrupalCon, having been taught multiple times (Chicago 2011, Denver 2012, Munich 2012) at recent events, with excerpts and new developments being presented by the trainers at several Drupal events across Europe.

Schedule Information
Room: 
Club DE · Adyax
Time slot: 
Monday · 09:00-18:00
Drupal Version: 
Drupal 7.x
Experience level: 
Advanced
Company: 
Nuvole