Drupal 8: A story of growing up and getting off the island

Angela Byron
Angela ByronPrincipal Community Manager at MongoDB
Drupal 8 
A Story of Growing Up and Getting Off the Island 
Angela "@webchick" Byron 
php[world] 
November 13, 2014
Who the heck are you? 
@webchick
What the heck are we talking 
about? 
• A brief intro to Drupal 
• Then vs. now 
• Re-writing your code base: a how-to 
guide 
• Lessons learned
Once upon a time… 
…in a dorm room far away (Antwerp, Belgium)…
Once upon a time… 
DRIES BUYTAERT 
…in a dorm room far away (Antwerp, Belgium)…
Once upon a time… 
DRIES BUYTAERT 
IKEA furniture 
…in a dorm room far away (Antwerp, Belgium)…
Once upon a time… 
Chess board 
DRIES BUYTAERT 
IKEA furniture 
…in a dorm room far away (Antwerp, Belgium)…
Once upon a time… 
Chess board 
DRIES BUYTAERT 
Stamp collection 
IKEA furniture 
…in a dorm room far away (Antwerp, Belgium)…
…A domain name 
registration was mis-typed… 
(Fun fact: Dries meant to register 'dorp.org,' which is Dutch for village, and 
accidentally found that drop.org was available.)
…And a project called 
"Drupal" was born. 
(Fun fact: "Drupal" is an Anglicization of the word "druppel" which is Dutch for "drop.")
What is Drupal? 
(Some context setting)
A content management system 
(to get you 80% there)
A content management system 
(to get you 80% there) 
Turn on features 
("modules")
A content management system 
(to get you 80% there) 
Turn on features 
("modules") 
Build content model 
("entities" and "fields")
A content management system 
(to get you 80% there) 
Turn on features 
("modules") 
Build content model 
("entities" and "fields") 
Create custom listings 
("views")
A content management system 
(to get you 80% there) 
Turn on features 
("modules") 
Build content model 
("entities" and "fields") 
Create custom listings 
("views") 
Make it purdy 
("themes")
A content management system 
(to get you 80% there) 
Turn on features 
("modules") 
…zero lines of code. 
Build content model 
("entities" and "fields") 
Create custom listings 
("views") 
Make it purdy 
("themes")
A content management framework 
(for that last ~20%) 
Add/extend functionality, integrate with third-party systems
An awesome community! 
(1.1M+ users, 35K+ developers, 2,400+ core contributors) 
Lots from non-traditional backgrounds, self-taught PHP via Drupal
Powering 2% of the web
Welcome to the Isle of 
Drupal!
Founded in 2001
Back then, OO PHP support 
wasn't stellar
So we had to invent creative 
ways to extend without OOP… 
…and many of these workarounds persist to this day.
Hooks 
user.module 
... 
foreach (module_list() as $name) { 
module_invoke($module_name, 'permission'); 
} 
... 
! 
example.module 
! 
function example_permission() { 
return array('administer examples'); 
}
Hooks 
user.module 
... 
foreach (module_list() as $name) { 
module_invoke($module_name, 'permission'); 
} 
... 
! 
example.module 
! 
function example_permission() { 
return array('administer examples'); 
}
Hooks 
user.module 
... 
foreach (module_list() as $name) { 
module_invoke($module_name, 'permission'); 
} 
... 
! 
example.module 
! 
function example_permission() { 
return array('administer examples'); 
}
Magically Named "Mystery 
Meat" Functions 
funecxtiaomn epxalemp.lme_ofodrmu(l)e { 
$form['greeting'] = array( 
'#type' => 'textfield', 
'#title' => t('Enter a greeting'), 
); 
$form['submit'] = array( 
'#type' => 'submit', 
'#value' => t('Greet me'), 
); 
return $form; 
} 
! 
function example_form_validate($form, &$form_state) { 
// Validate logic. 
} 
! 
function example_form_submit($form, &$form_state) { 
// Submit logic. 
}
Magically Named "Mystery 
Meat" Functions 
funecxtiaomn epxalemp.lme_ofodrmu(l)e { 
$form['greeting'] = array( 
'#type' => 'textfield', 
'#title' => t('Enter a greeting'), 
); 
$form['submit'] = array( 
'#type' => 'submit', 
'#value' => t('Greet me'), 
); 
return $form; 
} 
! 
function example_form_validate($form, &$form_state) { 
// Validate logic. 
} 
! 
function example_form_submit($form, &$form_state) { 
// Submit logic. 
}
Magically Named "Mystery 
Meat" Functions 
funecxtiaomn epxalemp.lme_ofodrmu(l)e { 
$form['greeting'] = array( 
'#type' => 'textfield', 
'#title' => t('Enter a greeting'), 
); 
$form['submit'] = array( 
'#type' => 'submit', 
'#value' => t('Greet me'), 
); 
return $form; 
} 
! 
function example_form_validate($form, &$form_state) { 
// Validate logic. 
} 
! 
function example_form_submit($form, &$form_state) { 
// Submit logic. 
}
Build/Alter Pattern 
example.module 
function example_menu() { 
$items['example'] = array( 
'title' => 'Example page', 
'page callback' => 'example_page', 
'access callback' => 'user_access', 
'access arguments' => array('administer foo'), 
); 
return $items; 
} 
! 
! 
custom.module 
function custom_menu_alter(&$items) { 
$items['example']['access arguments'] = array('view content'); 
}
Build/Alter Pattern 
example.module 
function example_menu() { 
$items['example'] = array( 
'title' => 'Example page', 
'page callback' => 'example_page', 
'access callback' => 'user_access', 
'access arguments' => array('administer foo'), 
); 
return $items; 
} 
! 
! 
custom.module 
function custom_menu_alter(&$items) { 
$items['example']['access arguments'] = array('view content'); 
}
Mistrust of third-party code
Mistrust of third-party code
Pain Points 
• Requires "unlearning" 
• ArrayPIs 
• Drupalisms 
• "Not Invented Here" 
• Talent pool
Enter Drupal 8
Re-joining the rest of the 
#phpworld! 
Composer 
Components 
PSR-4 
OOP 
Twig 
YAML 
Services
"Proudly Invented 
Elsewhere"
"Hello D8 World" 
example.info.yml 
name: Example 
description: "Example module" 
core: 8.x 
type: module 
example.routing.yml 
example.hello: 
path: '/hello' 
defaults: 
_content: 'DrupalexampleExampleController::hello' 
requirements: 
_permission: 'access content'
"Hello D8 World" 
src/ExampleController.php 
<?php 
namespace Drupalexample; 
use DrupalCoreControllerControllerBase; 
/** 
* Returns responses for Example module routes. 
*/ 
class ExampleController extends ControllerBase { 
public function hello() { 
return array('#markup' => $this->t('Hello world.')); 
} 
}
"Hello D8 World" 
src/ExampleController.php 
<?php 
namespace Drupalexample; 
use DrupalCoreControllerControllerBase; 
/** 
* Returns responses for Example module routes. 
*/ 
class ExampleController extends ControllerBase { 
public function hello() { 
return array('#markup' => $this->t('Hello world.')); 
} 
}
How did we get here? 
And how can lessons learned be applied to other 
projects?
There are two sides to any 
massive migration 
Code
There are two sides to any 
massive migration 
Code People
There are two sides to any 
massive migration 
Code People 
ignore this side at your GREAT peril!
0. Set the stage 
Pre-requisites to have in place first
Get your user base onto a 
modern platform 
(Fun fact: The GoPHP5 movement—a coalition of open source projects and hosts 
to expedite dropping support for PHP4 in 2007—was founded by Drupalistas! :))
Add metric butt-loads of 
automated test coverage 
Including continuous integration, so you can fix failures before commit 
(Fun fact: Drupal's 50K+ tests stayed 100% passing throughout D8's development)
Introduce a "taste" of the 
future 
db_update('example') 
->condition('id', $id) 
->fields(array('field2' => 10)) 
->execute(); 
Introduce concepts of OO and external libraries, get people comfortable with 
basics before going all out.
1. Set ambitious goals 
There's going to be a lot of pain before the pay-off; make 
the pay-off worth it.
Drupal 8 initiatives 
configuration 
management Mobile 
AUTHORING 
EXPERIENCE 
Multilingual Views web services
Refactor as part of achieving 
those goals
The most successful initiatives had 
leaders who… 
• Communicated "early and often"! 
• Documented decision-making 
• Built a team around them! 
• And genuinely valued that team 
• Sought ways to "scale" themselves! 
• Delegation 
• Re-usable training material 
http://hojtsy.hu/blog/2014-oct-17/authority-drupal-andor-open-source-general
2. Major change 
needs major buy-in 
Winning hearts and minds
Get the right people in the 
right room 
Web Services sprint: 
• Drupal and Symfony 
project leads 
• Initiative leads 
• Community voices 
• Detractors 
http://buytaert.net/the-future-is-a-restful-drupal
Detractors? Huh? 
• "Pure" trolls rarely exist! 
• But people feeling unheard, 
frustrated do 
• Provide outlet to air legitimate 
concerns! 
• Who knows; they might actually be 
right! 
• Build trust; remove defensiveness! 
• Ownership in process can turn 
detractors into advocates
Show your work! 
(Just like in math class. :)) 
• Can't just come back with a 
"decree" and expect people to 
fall in line.! 
• Folks need to understand and 
trust in your thought process 
• Transparency++ 
• "Issue queue or it didn't happen"
3. Git 'er done 
Iterate, iterate, iterate.
Shameless rip-off time! :) 
Thanks, Larry! Go check out the whole thing: 
http://www.palantir.net/presentations/lsp14-eating-elephpants/
How does one eat an 
elePHPant?
One bite at a time…
…with friends
…with lots of friends
For new functionality 
"Writing code should not be the first response. 
Finding if shared code exists should be the 
first response. 
— Beth Tucker-Long, Editor-in-Chief, php[architect]
For existing functionality 
• Refactor your app, don't replace it 
• Replace your component, don't refactor it 
• Especially cryptography! 
• Build new code as components, share with 
yourself 
• However! If ain't broke, don't fix it.
Drupal 7
Drupal 8 (early)
Remember: Incremental 
progress is still progress!
4. Recognize that major 
change is scary 
Empathy is your friend
Fear of losing investment in 
platform 
Particularly if it's your code that's being replaced.
Fear of going back to "square one" 
and being unable to catch up 
Especially pertinent for an aging community; hard to spend nights and 
weekends learning new things with kids and a mortgage
Fear of the unknown 
Not just OO, Symfony, but also entire toolchain; 
IDE vs. simple text editor/grep
Fear of losing what makes 
your community "you" 
Will hobbyists, non-techies be able to make the transition?
What helps? 
• Connecting: talking it out, sprints, planning meetings 
• Documentation: "conceptual" overviews, detailed API 
docs, books 
• Training: presentations, examples, blog posts 
• Tools: inspectors, scaffolding, automated code porting 
• DX (Developer Experience): eliminate boilerplate code, 
consistency/learnability of patterns 
• Reinforce that OO practices are used everywhere, 
may as well learn on a platform they already know!
When "stuff" hits the fan…
5 tips on handling a fork 
• Resist reacting. Instead, listen. 
• Dispel FUD, but take the high road 
• Help existing devs accentuate the 
positive 
• Try and maintain relationship with forkers 
• If concerns resonate, address them
Example: 
Semantic Versioning 
• Feature releases every 6 months 
• Backwards compatibility preserved 
• Both core devs and users working on same code base! 
• Drupal 9? Not until there's enough to warrant breaking BC
5. Avoid common 
pitfalls
Learn from our mistakes! 
Please! 
• The perfect is the enemy of the better. 
• "All you can eat" gives you a tummy-ache. 
• Don't be afraid to say "no." 
• Make decisions early and explicitly
In Summary 
1. Set the stage 
2. Set ambitious goals 
3. Major change needs major buy-in 
4. Recognize that major change is scary 
5. Avoid common pitfalls
We're not out of the woods 
yet…
…but we're thrilled to once 
again re-join the PHP world :)
Thank you! 
https://joind.in/11919 
Angela "@webchick" Byron 
php[world] 
November 13, 2014
1 of 83

Recommended

Django at Scale by
Django at ScaleDjango at Scale
Django at Scalebretthoerner
8.4K views43 slides
Moose workshop by
Moose workshopMoose workshop
Moose workshopYnon Perek
2.4K views142 slides
Intermediate OOP in PHP by
Intermediate OOP in PHPIntermediate OOP in PHP
Intermediate OOP in PHPDavid Stockton
1.2K views86 slides
Your code sucks, let's fix it! - php|tek13 by
Your code sucks, let's fix it! - php|tek13Your code sucks, let's fix it! - php|tek13
Your code sucks, let's fix it! - php|tek13Rafael Dohms
21.9K views135 slides
Banishing Loops with Functional Programming in PHP by
Banishing Loops with Functional Programming in PHPBanishing Loops with Functional Programming in PHP
Banishing Loops with Functional Programming in PHPDavid Hayes
1.9K views76 slides
Introduction to Moose by
Introduction to MooseIntroduction to Moose
Introduction to Moosethashaa
2.2K views47 slides

More Related Content

What's hot

Ruby by
RubyRuby
RubyKerry Buckley
1.2K views75 slides
Moose by
MooseMoose
MooseJohn Napiorkowski
3.4K views43 slides
Python Tricks That You Can't Live Without by
Python Tricks That You Can't Live WithoutPython Tricks That You Can't Live Without
Python Tricks That You Can't Live WithoutAudrey Roy
29.6K views45 slides
Gettingintotheloop 100123225021-phpapp01 by
Gettingintotheloop 100123225021-phpapp01Gettingintotheloop 100123225021-phpapp01
Gettingintotheloop 100123225021-phpapp01Ravi Kumar
5.5K views102 slides
Why (I think) CoffeeScript Is Awesome by
Why (I think) CoffeeScript Is AwesomeWhy (I think) CoffeeScript Is Awesome
Why (I think) CoffeeScript Is AwesomeJo Cranford
6.5K views74 slides
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018 by
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018Mike Harris
32 views39 slides

What's hot(20)

Python Tricks That You Can't Live Without by Audrey Roy
Python Tricks That You Can't Live WithoutPython Tricks That You Can't Live Without
Python Tricks That You Can't Live Without
Audrey Roy29.6K views
Gettingintotheloop 100123225021-phpapp01 by Ravi Kumar
Gettingintotheloop 100123225021-phpapp01Gettingintotheloop 100123225021-phpapp01
Gettingintotheloop 100123225021-phpapp01
Ravi Kumar5.5K views
Why (I think) CoffeeScript Is Awesome by Jo Cranford
Why (I think) CoffeeScript Is AwesomeWhy (I think) CoffeeScript Is Awesome
Why (I think) CoffeeScript Is Awesome
Jo Cranford6.5K views
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018 by Mike Harris
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
How I Learned to Stop Worrying and Love Legacy Code - Ox:Agile 2018
Mike Harris32 views
Let's write secure drupal code! - Drupal Camp Pannonia 2019 by Balázs Tatár
Let's write secure drupal code! - Drupal Camp Pannonia 2019Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019
Balázs Tatár575 views
Let's write secure Drupal code! - Drupal Camp Poland 2019 by Balázs Tatár
Let's write secure Drupal code! - Drupal Camp Poland 2019Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019
Balázs Tatár206 views
Writing SOLID code (in practice) by Tomasz Wójcik
Writing SOLID code (in practice)Writing SOLID code (in practice)
Writing SOLID code (in practice)
Tomasz Wójcik954 views
Let's write secure Drupal code! DUG Belgium - 08/08/2019 by Balázs Tatár
Let's write secure Drupal code! DUG Belgium - 08/08/2019Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019
Balázs Tatár288 views
Let's write secure Drupal code! - DrupalCamp Oslo, 2018 by Balázs Tatár
Let's write secure Drupal code! - DrupalCamp Oslo, 2018Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Balázs Tatár299 views
Moose - YAPC::NA 2012 by xSawyer
Moose - YAPC::NA 2012Moose - YAPC::NA 2012
Moose - YAPC::NA 2012
xSawyer1.3K views
Proxies are Awesome! by Brendan Eich
Proxies are Awesome!Proxies are Awesome!
Proxies are Awesome!
Brendan Eich39.5K views
Twig tips and tricks by Javier Eguiluz
Twig tips and tricksTwig tips and tricks
Twig tips and tricks
Javier Eguiluz199.3K views
[WLDN] Supercharging word press development in 2018 by Adam Tomat
[WLDN] Supercharging word press development in 2018[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
Adam Tomat291 views
Getting the most out of Java [Nordic Coding-2010] by Sven Efftinge
Getting the most out of Java [Nordic Coding-2010]Getting the most out of Java [Nordic Coding-2010]
Getting the most out of Java [Nordic Coding-2010]
Sven Efftinge560 views
Puppet Camp Portland 2015: Introduction to Hiera (Beginner) by Puppet
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet2.7K views

Similar to Drupal 8: A story of growing up and getting off the island

Php introduction by
Php introductionPhp introduction
Php introductionOsama Ghandour Geris
104 views28 slides
Advanced Php - Macq Electronique 2010 by
Advanced Php - Macq Electronique 2010Advanced Php - Macq Electronique 2010
Advanced Php - Macq Electronique 2010Michelangelo van Dam
3.8K views88 slides
REST APIs in Laravel 101 by
REST APIs in Laravel 101REST APIs in Laravel 101
REST APIs in Laravel 101Samantha Geitz
7.3K views53 slides
Drupal Camp Porto - Developing with Drupal: First Steps by
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsLuís Carneiro
1.4K views26 slides
PHP Basics and Demo HackU by
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackUAnshu Prateek
407 views17 slides
Drupal module development by
Drupal module developmentDrupal module development
Drupal module developmentDamjan Cvetan
515 views25 slides

Similar to Drupal 8: A story of growing up and getting off the island(20)

Drupal Camp Porto - Developing with Drupal: First Steps by Luís Carneiro
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First Steps
Luís Carneiro1.4K views
PHP Basics and Demo HackU by Anshu Prateek
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackU
Anshu Prateek407 views
Drupal module development by Damjan Cvetan
Drupal module developmentDrupal module development
Drupal module development
Damjan Cvetan515 views
Top 8 Improvements in Drupal 8 by Angela Byron
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
Angela Byron9.8K views
Rapid Prototyping with Solr by Erik Hatcher
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
Erik Hatcher1.1K views
Python: an introduction for PHP webdevelopers by Glenn De Backer
Python: an introduction for PHP webdevelopersPython: an introduction for PHP webdevelopers
Python: an introduction for PHP webdevelopers
Glenn De Backer1.5K views
Rapid Prototyping with Solr by Erik Hatcher
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
Erik Hatcher1.2K views
Phphacku iitd by Sorabh Jain
Phphacku iitdPhphacku iitd
Phphacku iitd
Sorabh Jain2.3K views
Python and Oracle : allies for best of data management by Laurent Leturgez
Python and Oracle : allies for best of data managementPython and Oracle : allies for best of data management
Python and Oracle : allies for best of data management
Laurent Leturgez192 views
PHP-03-Functions.ppt by Jamers2
PHP-03-Functions.pptPHP-03-Functions.ppt
PHP-03-Functions.ppt
Jamers29 views
Drupal Theme Development - DrupalCon Chicago 2011 by Ryan Price
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price5.3K views
EuroPython 2017 - Bonono - Simple ETL in python 3.5+ by Romain Dorgueil
EuroPython 2017 - Bonono - Simple ETL in python 3.5+EuroPython 2017 - Bonono - Simple ETL in python 3.5+
EuroPython 2017 - Bonono - Simple ETL in python 3.5+
Romain Dorgueil1.5K views

More from Angela Byron

Lessons Learned From Scaling An Open Source Community By 10,000% by
Lessons Learned From Scaling An Open Source Community By 10,000%Lessons Learned From Scaling An Open Source Community By 10,000%
Lessons Learned From Scaling An Open Source Community By 10,000%Angela Byron
2 views54 slides
Creating a Project Priority Matrix by
Creating a Project Priority MatrixCreating a Project Priority Matrix
Creating a Project Priority MatrixAngela Byron
316 views17 slides
From Imposter Syndrome to Core Committer: A GSoC Journey by
From Imposter Syndrome to Core Committer: A GSoC JourneyFrom Imposter Syndrome to Core Committer: A GSoC Journey
From Imposter Syndrome to Core Committer: A GSoC JourneyAngela Byron
340 views35 slides
Collaboration Needs of Massive Open Source Communities by
Collaboration Needs of Massive Open Source CommunitiesCollaboration Needs of Massive Open Source Communities
Collaboration Needs of Massive Open Source CommunitiesAngela Byron
213 views16 slides
Tales of Drupal Past: Origin Stories of Contributors by
Tales of Drupal Past: Origin Stories of ContributorsTales of Drupal Past: Origin Stories of Contributors
Tales of Drupal Past: Origin Stories of ContributorsAngela Byron
635 views59 slides
The Evolution of Drupal's governance by
The Evolution of Drupal's governanceThe Evolution of Drupal's governance
The Evolution of Drupal's governanceAngela Byron
715 views37 slides

More from Angela Byron(20)

Lessons Learned From Scaling An Open Source Community By 10,000% by Angela Byron
Lessons Learned From Scaling An Open Source Community By 10,000%Lessons Learned From Scaling An Open Source Community By 10,000%
Lessons Learned From Scaling An Open Source Community By 10,000%
Angela Byron2 views
Creating a Project Priority Matrix by Angela Byron
Creating a Project Priority MatrixCreating a Project Priority Matrix
Creating a Project Priority Matrix
Angela Byron316 views
From Imposter Syndrome to Core Committer: A GSoC Journey by Angela Byron
From Imposter Syndrome to Core Committer: A GSoC JourneyFrom Imposter Syndrome to Core Committer: A GSoC Journey
From Imposter Syndrome to Core Committer: A GSoC Journey
Angela Byron340 views
Collaboration Needs of Massive Open Source Communities by Angela Byron
Collaboration Needs of Massive Open Source CommunitiesCollaboration Needs of Massive Open Source Communities
Collaboration Needs of Massive Open Source Communities
Angela Byron213 views
Tales of Drupal Past: Origin Stories of Contributors by Angela Byron
Tales of Drupal Past: Origin Stories of ContributorsTales of Drupal Past: Origin Stories of Contributors
Tales of Drupal Past: Origin Stories of Contributors
Angela Byron635 views
The Evolution of Drupal's governance by Angela Byron
The Evolution of Drupal's governanceThe Evolution of Drupal's governance
The Evolution of Drupal's governance
Angela Byron715 views
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update by Angela Byron
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 updateDrupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Drupal 8 and 9, Backwards Compatibility, and Drupal 8.5 update
Angela Byron469 views
OCTO On-Site Off-Site Update on D8 Roadmap by Angela Byron
OCTO On-Site Off-Site Update on D8 RoadmapOCTO On-Site Off-Site Update on D8 Roadmap
OCTO On-Site Off-Site Update on D8 Roadmap
Angela Byron720 views
Drupal 9 and Backwards Compatibility: Why now is the time to upgrade to Drupal 8 by Angela Byron
Drupal 9 and Backwards Compatibility: Why now is the time to upgrade to Drupal 8Drupal 9 and Backwards Compatibility: Why now is the time to upgrade to Drupal 8
Drupal 9 and Backwards Compatibility: Why now is the time to upgrade to Drupal 8
Angela Byron5.6K views
From Troubled Waters to Water Under the Bridge by Angela Byron
From Troubled Waters to Water Under the BridgeFrom Troubled Waters to Water Under the Bridge
From Troubled Waters to Water Under the Bridge
Angela Byron489 views
Drupal 8 Adoption Myths Debunked by Angela Byron
Drupal 8 Adoption Myths DebunkedDrupal 8 Adoption Myths Debunked
Drupal 8 Adoption Myths Debunked
Angela Byron10K views
Acquia Company Update on Drupal 8.2/8.3/OCTO by Angela Byron
Acquia Company Update on Drupal 8.2/8.3/OCTOAcquia Company Update on Drupal 8.2/8.3/OCTO
Acquia Company Update on Drupal 8.2/8.3/OCTO
Angela Byron1.8K views
Drupal's competition by Angela Byron
Drupal's competitionDrupal's competition
Drupal's competition
Angela Byron1.2K views
Drupal 8 Initiatives by Angela Byron
Drupal 8 InitiativesDrupal 8 Initiatives
Drupal 8 Initiatives
Angela Byron1.4K views
The potential in Drupal 8.x and how to realize it by Angela Byron
The potential in Drupal 8.x and how to realize itThe potential in Drupal 8.x and how to realize it
The potential in Drupal 8.x and how to realize it
Angela Byron287 views
Acquia Drupal 8 Hackathon Demo 2015 by Angela Byron
Acquia Drupal 8 Hackathon Demo 2015Acquia Drupal 8 Hackathon Demo 2015
Acquia Drupal 8 Hackathon Demo 2015
Angela Byron740 views
Drupal 8 - Build Week Update by Angela Byron
Drupal 8 - Build Week UpdateDrupal 8 - Build Week Update
Drupal 8 - Build Week Update
Angela Byron1.5K views
Plain english guide to drupal 8 criticals by Angela Byron
Plain english guide to drupal 8 criticalsPlain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticals
Angela Byron2K views
Evolution of Drupal and the Drupal community by Angela Byron
Evolution of Drupal and the Drupal communityEvolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal community
Angela Byron2K views

Recently uploaded

STPI OctaNE CoE Brochure.pdf by
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdfmadhurjyapb
14 views1 slide
SAP Automation Using Bar Code and FIORI.pdf by
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdfVirendra Rai, PMP
25 views38 slides
Ransomware is Knocking your Door_Final.pdf by
Ransomware is Knocking your Door_Final.pdfRansomware is Knocking your Door_Final.pdf
Ransomware is Knocking your Door_Final.pdfSecurity Bootcamp
66 views46 slides
SUPPLIER SOURCING.pptx by
SUPPLIER SOURCING.pptxSUPPLIER SOURCING.pptx
SUPPLIER SOURCING.pptxangelicacueva6
20 views1 slide
Future of Indian ConsumerTech by
Future of Indian ConsumerTechFuture of Indian ConsumerTech
Future of Indian ConsumerTechKapil Khandelwal (KK)
24 views68 slides
PRODUCT PRESENTATION.pptx by
PRODUCT PRESENTATION.pptxPRODUCT PRESENTATION.pptx
PRODUCT PRESENTATION.pptxangelicacueva6
18 views1 slide

Recently uploaded(20)

STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman38 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely29 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays33 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker48 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson126 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana17 views

Drupal 8: A story of growing up and getting off the island

  • 1. Drupal 8 A Story of Growing Up and Getting Off the Island Angela "@webchick" Byron php[world] November 13, 2014
  • 2. Who the heck are you? @webchick
  • 3. What the heck are we talking about? • A brief intro to Drupal • Then vs. now • Re-writing your code base: a how-to guide • Lessons learned
  • 4. Once upon a time… …in a dorm room far away (Antwerp, Belgium)…
  • 5. Once upon a time… DRIES BUYTAERT …in a dorm room far away (Antwerp, Belgium)…
  • 6. Once upon a time… DRIES BUYTAERT IKEA furniture …in a dorm room far away (Antwerp, Belgium)…
  • 7. Once upon a time… Chess board DRIES BUYTAERT IKEA furniture …in a dorm room far away (Antwerp, Belgium)…
  • 8. Once upon a time… Chess board DRIES BUYTAERT Stamp collection IKEA furniture …in a dorm room far away (Antwerp, Belgium)…
  • 9. …A domain name registration was mis-typed… (Fun fact: Dries meant to register 'dorp.org,' which is Dutch for village, and accidentally found that drop.org was available.)
  • 10. …And a project called "Drupal" was born. (Fun fact: "Drupal" is an Anglicization of the word "druppel" which is Dutch for "drop.")
  • 11. What is Drupal? (Some context setting)
  • 12. A content management system (to get you 80% there)
  • 13. A content management system (to get you 80% there) Turn on features ("modules")
  • 14. A content management system (to get you 80% there) Turn on features ("modules") Build content model ("entities" and "fields")
  • 15. A content management system (to get you 80% there) Turn on features ("modules") Build content model ("entities" and "fields") Create custom listings ("views")
  • 16. A content management system (to get you 80% there) Turn on features ("modules") Build content model ("entities" and "fields") Create custom listings ("views") Make it purdy ("themes")
  • 17. A content management system (to get you 80% there) Turn on features ("modules") …zero lines of code. Build content model ("entities" and "fields") Create custom listings ("views") Make it purdy ("themes")
  • 18. A content management framework (for that last ~20%) Add/extend functionality, integrate with third-party systems
  • 19. An awesome community! (1.1M+ users, 35K+ developers, 2,400+ core contributors) Lots from non-traditional backgrounds, self-taught PHP via Drupal
  • 20. Powering 2% of the web
  • 21. Welcome to the Isle of Drupal!
  • 23. Back then, OO PHP support wasn't stellar
  • 24. So we had to invent creative ways to extend without OOP… …and many of these workarounds persist to this day.
  • 25. Hooks user.module ... foreach (module_list() as $name) { module_invoke($module_name, 'permission'); } ... ! example.module ! function example_permission() { return array('administer examples'); }
  • 26. Hooks user.module ... foreach (module_list() as $name) { module_invoke($module_name, 'permission'); } ... ! example.module ! function example_permission() { return array('administer examples'); }
  • 27. Hooks user.module ... foreach (module_list() as $name) { module_invoke($module_name, 'permission'); } ... ! example.module ! function example_permission() { return array('administer examples'); }
  • 28. Magically Named "Mystery Meat" Functions funecxtiaomn epxalemp.lme_ofodrmu(l)e { $form['greeting'] = array( '#type' => 'textfield', '#title' => t('Enter a greeting'), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Greet me'), ); return $form; } ! function example_form_validate($form, &$form_state) { // Validate logic. } ! function example_form_submit($form, &$form_state) { // Submit logic. }
  • 29. Magically Named "Mystery Meat" Functions funecxtiaomn epxalemp.lme_ofodrmu(l)e { $form['greeting'] = array( '#type' => 'textfield', '#title' => t('Enter a greeting'), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Greet me'), ); return $form; } ! function example_form_validate($form, &$form_state) { // Validate logic. } ! function example_form_submit($form, &$form_state) { // Submit logic. }
  • 30. Magically Named "Mystery Meat" Functions funecxtiaomn epxalemp.lme_ofodrmu(l)e { $form['greeting'] = array( '#type' => 'textfield', '#title' => t('Enter a greeting'), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Greet me'), ); return $form; } ! function example_form_validate($form, &$form_state) { // Validate logic. } ! function example_form_submit($form, &$form_state) { // Submit logic. }
  • 31. Build/Alter Pattern example.module function example_menu() { $items['example'] = array( 'title' => 'Example page', 'page callback' => 'example_page', 'access callback' => 'user_access', 'access arguments' => array('administer foo'), ); return $items; } ! ! custom.module function custom_menu_alter(&$items) { $items['example']['access arguments'] = array('view content'); }
  • 32. Build/Alter Pattern example.module function example_menu() { $items['example'] = array( 'title' => 'Example page', 'page callback' => 'example_page', 'access callback' => 'user_access', 'access arguments' => array('administer foo'), ); return $items; } ! ! custom.module function custom_menu_alter(&$items) { $items['example']['access arguments'] = array('view content'); }
  • 35. Pain Points • Requires "unlearning" • ArrayPIs • Drupalisms • "Not Invented Here" • Talent pool
  • 37. Re-joining the rest of the #phpworld! Composer Components PSR-4 OOP Twig YAML Services
  • 39. "Hello D8 World" example.info.yml name: Example description: "Example module" core: 8.x type: module example.routing.yml example.hello: path: '/hello' defaults: _content: 'DrupalexampleExampleController::hello' requirements: _permission: 'access content'
  • 40. "Hello D8 World" src/ExampleController.php <?php namespace Drupalexample; use DrupalCoreControllerControllerBase; /** * Returns responses for Example module routes. */ class ExampleController extends ControllerBase { public function hello() { return array('#markup' => $this->t('Hello world.')); } }
  • 41. "Hello D8 World" src/ExampleController.php <?php namespace Drupalexample; use DrupalCoreControllerControllerBase; /** * Returns responses for Example module routes. */ class ExampleController extends ControllerBase { public function hello() { return array('#markup' => $this->t('Hello world.')); } }
  • 42. How did we get here? And how can lessons learned be applied to other projects?
  • 43. There are two sides to any massive migration Code
  • 44. There are two sides to any massive migration Code People
  • 45. There are two sides to any massive migration Code People ignore this side at your GREAT peril!
  • 46. 0. Set the stage Pre-requisites to have in place first
  • 47. Get your user base onto a modern platform (Fun fact: The GoPHP5 movement—a coalition of open source projects and hosts to expedite dropping support for PHP4 in 2007—was founded by Drupalistas! :))
  • 48. Add metric butt-loads of automated test coverage Including continuous integration, so you can fix failures before commit (Fun fact: Drupal's 50K+ tests stayed 100% passing throughout D8's development)
  • 49. Introduce a "taste" of the future db_update('example') ->condition('id', $id) ->fields(array('field2' => 10)) ->execute(); Introduce concepts of OO and external libraries, get people comfortable with basics before going all out.
  • 50. 1. Set ambitious goals There's going to be a lot of pain before the pay-off; make the pay-off worth it.
  • 51. Drupal 8 initiatives configuration management Mobile AUTHORING EXPERIENCE Multilingual Views web services
  • 52. Refactor as part of achieving those goals
  • 53. The most successful initiatives had leaders who… • Communicated "early and often"! • Documented decision-making • Built a team around them! • And genuinely valued that team • Sought ways to "scale" themselves! • Delegation • Re-usable training material http://hojtsy.hu/blog/2014-oct-17/authority-drupal-andor-open-source-general
  • 54. 2. Major change needs major buy-in Winning hearts and minds
  • 55. Get the right people in the right room Web Services sprint: • Drupal and Symfony project leads • Initiative leads • Community voices • Detractors http://buytaert.net/the-future-is-a-restful-drupal
  • 56. Detractors? Huh? • "Pure" trolls rarely exist! • But people feeling unheard, frustrated do • Provide outlet to air legitimate concerns! • Who knows; they might actually be right! • Build trust; remove defensiveness! • Ownership in process can turn detractors into advocates
  • 57. Show your work! (Just like in math class. :)) • Can't just come back with a "decree" and expect people to fall in line.! • Folks need to understand and trust in your thought process • Transparency++ • "Issue queue or it didn't happen"
  • 58. 3. Git 'er done Iterate, iterate, iterate.
  • 59. Shameless rip-off time! :) Thanks, Larry! Go check out the whole thing: http://www.palantir.net/presentations/lsp14-eating-elephpants/
  • 60. How does one eat an elePHPant?
  • 61. One bite at a time…
  • 63. …with lots of friends
  • 64. For new functionality "Writing code should not be the first response. Finding if shared code exists should be the first response. — Beth Tucker-Long, Editor-in-Chief, php[architect]
  • 65. For existing functionality • Refactor your app, don't replace it • Replace your component, don't refactor it • Especially cryptography! • Build new code as components, share with yourself • However! If ain't broke, don't fix it.
  • 68. Remember: Incremental progress is still progress!
  • 69. 4. Recognize that major change is scary Empathy is your friend
  • 70. Fear of losing investment in platform Particularly if it's your code that's being replaced.
  • 71. Fear of going back to "square one" and being unable to catch up Especially pertinent for an aging community; hard to spend nights and weekends learning new things with kids and a mortgage
  • 72. Fear of the unknown Not just OO, Symfony, but also entire toolchain; IDE vs. simple text editor/grep
  • 73. Fear of losing what makes your community "you" Will hobbyists, non-techies be able to make the transition?
  • 74. What helps? • Connecting: talking it out, sprints, planning meetings • Documentation: "conceptual" overviews, detailed API docs, books • Training: presentations, examples, blog posts • Tools: inspectors, scaffolding, automated code porting • DX (Developer Experience): eliminate boilerplate code, consistency/learnability of patterns • Reinforce that OO practices are used everywhere, may as well learn on a platform they already know!
  • 75. When "stuff" hits the fan…
  • 76. 5 tips on handling a fork • Resist reacting. Instead, listen. • Dispel FUD, but take the high road • Help existing devs accentuate the positive • Try and maintain relationship with forkers • If concerns resonate, address them
  • 77. Example: Semantic Versioning • Feature releases every 6 months • Backwards compatibility preserved • Both core devs and users working on same code base! • Drupal 9? Not until there's enough to warrant breaking BC
  • 78. 5. Avoid common pitfalls
  • 79. Learn from our mistakes! Please! • The perfect is the enemy of the better. • "All you can eat" gives you a tummy-ache. • Don't be afraid to say "no." • Make decisions early and explicitly
  • 80. In Summary 1. Set the stage 2. Set ambitious goals 3. Major change needs major buy-in 4. Recognize that major change is scary 5. Avoid common pitfalls
  • 81. We're not out of the woods yet…
  • 82. …but we're thrilled to once again re-join the PHP world :)
  • 83. Thank you! https://joind.in/11919 Angela "@webchick" Byron php[world] November 13, 2014