Four Kitchens
Insights

Drupal practice group install

3 Min. ReadDevelopment

We’re all busy, but we want to stay current in technologies like Drupal 8. How does one balance the need to deliver value to clients yet continue to explore new technologies and be mindful of a work-life balance? That’s a tough one, and I’d like to share an approach we’ve been taking for the past few months.

Book club approach

Our Drupal Practice Group started as a series of bi-weekly challenges, each building off the previous. The challenges are designed to expand the participant’s knowledge and to teach new skills. Completion of a challenge is not required to discuss or learn, but similar to a book club you’ll get the most out of the experience by doing it yourself. Each challenge will be encapsulated and should be accomplished in an hour or two. If assistance is needed, people can reach out to other participants and collaborate on a solution.

The meetings go for about a half-hour, where we briefly discuss individual “trip reports” of the current challenge, specifically:

  • What was it like?
  • What did you learn?
  • What would you do differently?

From that discussion, we determine lessons learned and best practices, then agree on the next challenge.

The first challenge: Install Drupal 8

Everybody’s got to start somewhere, and we started modestly:

Install Drupal 8 and one contrib module of your choice locally.

What, that’s it? Well, yes, but keep in mind that this isn’t the same as saying “follow these step-by-step directions”. This is a new process, individual development environments may vary, what may have been tried-and-true for Drupal 7 might not exist in Drupal 8 or is completely different.

Lessons learned

By sending people out into the wilderness, we learned about experiences with multiple environments (Kalabox, Scotchbox, Drupal VM, MAMP, and native) and perspective and were able to distill a number of lessons learned.

Here’s a selection of the lessons we learned compiled on July 2, 2015; some may have evolved since, so like any pre-release Drupal 8 information recheck your assumptions!

$settings['trusted_host_patterns'] = array(
'^drucompose-me.kbox$',
);

  • Must set the hash_salt for the site to work; best practice is to include it from a file outside of the site root.
    • $settings['hash_salt'] = 'puppies';
  • Update your local Composer!
  • Drupal 8 core API publishing isn’t a complete solution, look for RESTful in the future
  • PHPUnit ships with Drupal
    • ./core/vendor/phpunit/phpunit/phpunit -c ./core/phpunit.xml.dist PATH/TO/MODULE
  • Check out drupal-composer/drupal-project to build sites using composer

The next challenge: First Drupal 8 module

Building upon the foundation of the first challenge, create a module that defines a block that executes dynamic, cacheable code. We recommend installing http://drupalconsole.com/ to generate scaffolding.


We’ll continue posting our practice group experiences and challenges on a regular basis. Let us know about your experience in the comments; we learn from each other!