SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
Building
rednoseday.com
on Drupal 8
Peter Vanhee

Tech Lead at Comic Relief

@pvhee
DrupalCamp London 2017
• Comic Relief strives to create a just world free from
poverty
• We raise millions of pounds through two big fundraising
campaigns – Red Nose Day and Sport Relief.
• We spend that money in the best possible way to tackle
the root causes of poverty and social injustice.
• We use the power of our brand to raise awareness of the
issues that we care most about.
Who am I?
• Tech Lead at Comic Relief 

https://technology.comicrelief.com
• Founder of Marzee Labs, a tech shop from
Barcelona @marzeelabs
• Long-time Drupal contributor @pvhee
Drupal at Comic Relief
• 2014: comicrelief.com
• 2015: 2015.rednoseday.com
• 2016: sportrelief.com
Drupal at Comic Relief
• 2014: comicrelief.com
• 2015: 2015.rednoseday.com
• 2016: sportrelief.com
• 2017: rednoseday.com
A fresh start?
• Build a campaign website
• Build a product that can build campaign websites
• Build a product that allows editors to reorganise
row components to build a website
• Continuously iterate over our codebase
A product should…
• support iterative development
• have a clear versioning scheme
• have tests to guarantee quality
• provide a sensible default start for any campaign
• allow for customisation
Technology Choice?
Drupal 8, because of
• embracing industry PHP standards
• built on top of Symfony, use of Twig and Composer
• editorial features “out of the box”
• accessibility features
• built-in REST capabilities
• a development challenge
You can’t be that kid
standing at the top
of the waterslide,
overthinking it.
You have to go
down the chute.

Tina Fey
Ingredients to build our product
• Focus on Editor Experience
• Automate and streamline
• Decoupled services
Editor Experience
Landing pages as the norm
• First iteration: panels with panelizer
• Second iteration: panels with panelizer and
embedded paragraphs
• Third iteration: paragraphs with block reference
Header with Menu
Footer
Paragraph 1
Paragraph 2
Paragraph 3
Paragraph n
… library of blocks
custom blocks 

(like email signup)
Editorial blocks
Paragraph types
“content wall”

(rows + teasers are blocks)
Cards
blocks are reusable
paragraphs are not reusable
Quotes
Embed
Node Block reference
BLOCKS
PARAGRAPHS
reusable
not reusable
libraryquick edit
contextual links
only editable via node
no quick-edit

(see node …)
content fields
layout fields
reference
Living Style Guide
Living Style Guide
• Using KSS, “a documentation syntax for CSS”
• Our new “incubation area”
• Code and style guide are one — no need to update
one or the other independently thus guaranteeing
it stays fresh!
Style-guide driven development
Component
idea
Style Guide

(or Pattern Lab)



HTML, SCSS, JS
Review

Multi-device QA
Sign-off
Drupal development



Content model

View modes

Component module

Twig / PHP

Improved editor experience
Red Nose Day 2015

(Drupal 7)
Red Nose Day 2017

(Drupal 8)
Automate & streamline
everything
A build in one step
• Package up our website product using an
installation profile and using CMI, via
config_devel
• Default content in JSON
• Use a build tool — we use Phing and run 

phing build often
Config modules
Collaborative coding
No automation without tests
• Code quality checks using CodeSniffer, phpmd, phpcpd
• Configuration checks using config_devel
• Distribution installation tests using phing build
• Behavior tests on distribution using Behat
• Drupal log checks (no errors, warnings generated by Behat)
• Visual regression tests using BBC Wraith
Behat tests
Continuous Integration
Preview branches
Decoupled services
Slide from Chet Haase
Minimise custom code
• we have around 2000 custom lines of PHP code
(options callbacks, custom Display Suite fields, Solr
tweaks)
• “Non-glue code” is contributed back as standalone
Drupal modules: rabbitmq, social_links
The Embed Pattern
The Queue Pattern
Producer = Drupal Queue Consumer = 3rd party
an example: email list subscription

- Producer: Email Signup Form

- Queue: holds email address, template ID, etc.

- Consumer: PHP / nodejs app talking to MailChimp

Drupal Producer/**
* Our signup form.
*/
class ExampleForm extends FormBase {
public function buildForm(array $form, Form…face $form_state) {
$form['email'] = [
'#type' => 'email',
'#title' => $this->t(‘Your email address.'),
];
$form['show'] = [
'#type' => 'submit',
'#value' => $this->t('Submit'),
];
return $form;
}
public function submitForm(array &$form, Form…face $form_state) {
// Get the data you want to send to the queue.
$data = $form_state->getValue('email');
// Get the queue config and send it to the data to the queue.
$queue_name = 'queue1';
$queue_factory = Drupal::service('queue');
$queue = $queue_factory->get($queue_name);
$queue->createItem($data);
// Send some feedback.
drupal_set_message(
$this->t(‘Added data to queue @queue: @email', [
'@queue' => $queue_name,
'@email' => $form_state->getValue('email'),
])
);
}
}
// Our rabbitmq.config.yml configuration
exchanges:
my_exchange:
type: 'direct'
passive: false
durable: true
auto_delete: false
internal: false
nowait: false
queues:
my_queue:
passive: false
durable: false
exclusive: false
auto_delete: true
nowait: false
routing_keys:
- 'my_exchange.my_queue'
// Add to settings.php
$settings['queue_service_queue1'] = 

'queue.rabbitmq';
rabbitmq module at 

drupal.org/project/rabbitmq
using Drupal 8 Queue API
RabbitMQ Queue
3-rd party Consumer
class QueueConsumer implements ConsumerInterface
{
/* @var stdClass */
private $processingService;
/**
* Parse message as JSON and send to processor
*
* @param AMQPMessage $msg
* @return bool
*/
public function execute(AMQPMessage $msg)
{
if ($decodedMessage = json_decode($msg->body)) {
try {
return $this->processingService->process($decodedMessage);
} catch (Exception $e) {
$this->logger->alert(‘Queue process error:' . $e->getMessage());
}
} else {
$this->logger->info(sprintf('Unable to parse as JSON: "%s"',
$msg->body));
}
return false;
}
}
Towards micro-services
• oEmbed / iFrame for integrating 3rd-party apps in
the CMS
• Message Queues for decoupling logic
What about rednoseday.com?
From product to website
campaign 

distribution

- v1.1

- … 

- v1.36

- … 

- v2.x
rednoseday.com

comicrelief.com
rednoseday.org
(USA)
sportrelief.com
From product to website
campaign 

distribution

- v1.1

- … 

- v1.36

- … 

- v2.x
rednoseday.com

- campaign v1.36 as
dependency
- env vars (queue info, db
info, …)

- RND17 theme

- YML site configuration sites/
default/config
- composer / make
- hook_update

- drush config-devel-import
comicrelief.com
rednoseday.org
(USA)
sportrelief.com
you?
Questions?

@pvhee

www.rednoseday.com
Friday 24 March

Mais conteúdo relacionado

Mais procurados

Plugin development demystified 2017
Plugin development demystified 2017Plugin development demystified 2017
Plugin development demystified 2017ylefebvre
 
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)Andrew Duthie
 
Custom Post Types in WP3
Custom Post Types in WP3Custom Post Types in WP3
Custom Post Types in WP3gregghenry
 
Drupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionDrupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionJeff Geerling
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSuzanne Dergacheva
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasSuzanne Dergacheva
 
Drupal 8 Configuration Management
Drupal 8 Configuration ManagementDrupal 8 Configuration Management
Drupal 8 Configuration ManagementExove
 
Using JavaScript Libraries like D3.js with WordPress
Using JavaScript Libraries like D3.js with WordPressUsing JavaScript Libraries like D3.js with WordPress
Using JavaScript Libraries like D3.js with WordPressJohn Cook
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Acquia
 
Responsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsResponsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsSuzanne Dergacheva
 
Wordpress as a Backend
Wordpress as a BackendWordpress as a Backend
Wordpress as a BackendAndrew Duthie
 
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirstBuilding CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirstJun-ichi Sakamoto
 
Bootstrap Framework and Drupal
Bootstrap Framework and DrupalBootstrap Framework and Drupal
Bootstrap Framework and DrupalJim Birch
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Ivan Zugec
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
 
ARTDM 170, Week 3: Rollovers
ARTDM 170, Week 3: RolloversARTDM 170, Week 3: Rollovers
ARTDM 170, Week 3: RolloversGilbert Guerrero
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Morten Rand-Hendriksen
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-BoxSuzanne Dergacheva
 

Mais procurados (19)

Keystone.js 101
Keystone.js 101Keystone.js 101
Keystone.js 101
 
Plugin development demystified 2017
Plugin development demystified 2017Plugin development demystified 2017
Plugin development demystified 2017
 
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
 
Custom Post Types in WP3
Custom Post Types in WP3Custom Post Types in WP3
Custom Post Types in WP3
 
Drupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionDrupal 8 - A Brief Introduction
Drupal 8 - A Brief Introduction
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp Ottawa
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and Gotchas
 
Drupal 8 Configuration Management
Drupal 8 Configuration ManagementDrupal 8 Configuration Management
Drupal 8 Configuration Management
 
Using JavaScript Libraries like D3.js with WordPress
Using JavaScript Libraries like D3.js with WordPressUsing JavaScript Libraries like D3.js with WordPress
Using JavaScript Libraries like D3.js with WordPress
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
 
Responsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen GridsResponsive Design in Drupal with Zen and Zen Grids
Responsive Design in Drupal with Zen and Zen Grids
 
Wordpress as a Backend
Wordpress as a BackendWordpress as a Backend
Wordpress as a Backend
 
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirstBuilding CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst
Building CLR/H Registration Site with ASP.NET MVC4 and EF4CodeFirst
 
Bootstrap Framework and Drupal
Bootstrap Framework and DrupalBootstrap Framework and Drupal
Bootstrap Framework and Drupal
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
ARTDM 170, Week 3: Rollovers
ARTDM 170, Week 3: RolloversARTDM 170, Week 3: Rollovers
ARTDM 170, Week 3: Rollovers
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box
 

Destaque

Comic Relief and Red Nose Day
Comic Relief and Red Nose DayComic Relief and Red Nose Day
Comic Relief and Red Nose DaySandy Millin
 
Sciennes Comic Relief P4-7 Assembly 13.3.15
Sciennes Comic Relief P4-7 Assembly 13.3.15Sciennes Comic Relief P4-7 Assembly 13.3.15
Sciennes Comic Relief P4-7 Assembly 13.3.15Sciennes Primary School
 
Red Nose Day!!!
Red Nose Day!!!Red Nose Day!!!
Red Nose Day!!!adamibbo
 
Building Drupal 8 Sites
Building Drupal 8 SitesBuilding Drupal 8 Sites
Building Drupal 8 SitesExove
 
Drupaling a Devleopment Plan
Drupaling a Devleopment PlanDrupaling a Devleopment Plan
Drupaling a Devleopment Planjskulski
 
Requirements & Drupal: Planning for Successful Projects
Requirements & Drupal: Planning for Successful ProjectsRequirements & Drupal: Planning for Successful Projects
Requirements & Drupal: Planning for Successful ProjectsAcquia
 
schools certificate (red nose day )
 schools certificate (red nose day ) schools certificate (red nose day )
schools certificate (red nose day )sklr2001
 
Case Study: Comic relief
Case Study: Comic relief Case Study: Comic relief
Case Study: Comic relief Brandwatch
 
Drupal project timeline
Drupal project timelineDrupal project timeline
Drupal project timelineArdi Hundt
 
Standards: Don't pee in the pool
Standards: Don't pee in the poolStandards: Don't pee in the pool
Standards: Don't pee in the poolDavid Yell
 
Meet the Funders - Comic Relief
Meet the Funders - Comic ReliefMeet the Funders - Comic Relief
Meet the Funders - Comic Reliefwalescva
 
Drupal 8 Preview for Site Builders
Drupal 8 Preview for Site BuildersDrupal 8 Preview for Site Builders
Drupal 8 Preview for Site BuildersAcquia
 
Townsend french preposition homework
Townsend french preposition homeworkTownsend french preposition homework
Townsend french preposition homeworkConnie Wiltshire
 
Component Driven Development - DrupalCamp London 2017
Component Driven Development - DrupalCamp London 2017Component Driven Development - DrupalCamp London 2017
Component Driven Development - DrupalCamp London 2017John Ennew
 
Style Me Confident Red Nose Day
Style Me Confident Red Nose DayStyle Me Confident Red Nose Day
Style Me Confident Red Nose Daystylemeconfident
 

Destaque (20)

Comic Relief and Red Nose Day
Comic Relief and Red Nose DayComic Relief and Red Nose Day
Comic Relief and Red Nose Day
 
Sciennes Comic Relief P4-7 Assembly 13.3.15
Sciennes Comic Relief P4-7 Assembly 13.3.15Sciennes Comic Relief P4-7 Assembly 13.3.15
Sciennes Comic Relief P4-7 Assembly 13.3.15
 
Comic Relief 2009
Comic Relief 2009Comic Relief 2009
Comic Relief 2009
 
Comic relief lesson
Comic relief lessonComic relief lesson
Comic relief lesson
 
Red Nose Day!!!
Red Nose Day!!!Red Nose Day!!!
Red Nose Day!!!
 
Building Drupal 8 Sites
Building Drupal 8 SitesBuilding Drupal 8 Sites
Building Drupal 8 Sites
 
Drupaling a Devleopment Plan
Drupaling a Devleopment PlanDrupaling a Devleopment Plan
Drupaling a Devleopment Plan
 
Requirements & Drupal: Planning for Successful Projects
Requirements & Drupal: Planning for Successful ProjectsRequirements & Drupal: Planning for Successful Projects
Requirements & Drupal: Planning for Successful Projects
 
schools certificate (red nose day )
 schools certificate (red nose day ) schools certificate (red nose day )
schools certificate (red nose day )
 
Case Study: Comic relief
Case Study: Comic relief Case Study: Comic relief
Case Study: Comic relief
 
Bullying powerpoint
Bullying powerpointBullying powerpoint
Bullying powerpoint
 
Message Queues and Drupal
Message Queues and DrupalMessage Queues and Drupal
Message Queues and Drupal
 
Drupal 7 Queues
Drupal 7 QueuesDrupal 7 Queues
Drupal 7 Queues
 
Drupal project timeline
Drupal project timelineDrupal project timeline
Drupal project timeline
 
Standards: Don't pee in the pool
Standards: Don't pee in the poolStandards: Don't pee in the pool
Standards: Don't pee in the pool
 
Meet the Funders - Comic Relief
Meet the Funders - Comic ReliefMeet the Funders - Comic Relief
Meet the Funders - Comic Relief
 
Drupal 8 Preview for Site Builders
Drupal 8 Preview for Site BuildersDrupal 8 Preview for Site Builders
Drupal 8 Preview for Site Builders
 
Townsend french preposition homework
Townsend french preposition homeworkTownsend french preposition homework
Townsend french preposition homework
 
Component Driven Development - DrupalCamp London 2017
Component Driven Development - DrupalCamp London 2017Component Driven Development - DrupalCamp London 2017
Component Driven Development - DrupalCamp London 2017
 
Style Me Confident Red Nose Day
Style Me Confident Red Nose DayStyle Me Confident Red Nose Day
Style Me Confident Red Nose Day
 

Semelhante a Building rednoseday.com on Drupal 8

Introduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxIntroduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxlekhacce
 
Microservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterMicroservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterC4Media
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxsilvers5
 
Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8Italo Mairo
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Mike Schinkel
 
Lect-5--JavaScript-Intro-12032024-105816am.pptx
Lect-5--JavaScript-Intro-12032024-105816am.pptxLect-5--JavaScript-Intro-12032024-105816am.pptx
Lect-5--JavaScript-Intro-12032024-105816am.pptxzainm7032
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 
Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!mold
 
Rails for Beginners - Le Wagon
Rails for Beginners - Le WagonRails for Beginners - Le Wagon
Rails for Beginners - Le WagonAlex Benoit
 
Synapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephpSynapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephpSynapseindiaComplaints
 
Rails antipattern-public
Rails antipattern-publicRails antipattern-public
Rails antipattern-publicChul Ju Hong
 
Forms as Structured Content
Forms as Structured Content Forms as Structured Content
Forms as Structured Content dotCMS
 
Rails antipatterns
Rails antipatternsRails antipatterns
Rails antipatternsChul Ju Hong
 

Semelhante a Building rednoseday.com on Drupal 8 (20)

025444215.pptx
025444215.pptx025444215.pptx
025444215.pptx
 
Introduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptxIntroduction to HTML language Web design.pptx
Introduction to HTML language Web design.pptx
 
25444215.pptx
25444215.pptx25444215.pptx
25444215.pptx
 
web development
web developmentweb development
web development
 
Microservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterMicroservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell Monster
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
 
Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
web development
web developmentweb development
web development
 
Mvc summary
Mvc summaryMvc summary
Mvc summary
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)
 
Lect-5--JavaScript-Intro-12032024-105816am.pptx
Lect-5--JavaScript-Intro-12032024-105816am.pptxLect-5--JavaScript-Intro-12032024-105816am.pptx
Lect-5--JavaScript-Intro-12032024-105816am.pptx
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!
 
Rails for Beginners - Le Wagon
Rails for Beginners - Le WagonRails for Beginners - Le Wagon
Rails for Beginners - Le Wagon
 
Supa fast Ruby + Rails
Supa fast Ruby + RailsSupa fast Ruby + Rails
Supa fast Ruby + Rails
 
Synapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephpSynapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro cakephp
 
Rails antipattern-public
Rails antipattern-publicRails antipattern-public
Rails antipattern-public
 
Forms as Structured Content
Forms as Structured Content Forms as Structured Content
Forms as Structured Content
 
Rails antipatterns
Rails antipatternsRails antipatterns
Rails antipatterns
 

Mais de Peter Vanhee

Going serverless at Comic Relief - July 2019
Going serverless at Comic Relief - July 2019Going serverless at Comic Relief - July 2019
Going serverless at Comic Relief - July 2019Peter Vanhee
 
Predicting peptide interactions using protein building blocks
Predicting peptide interactions using protein building blocksPredicting peptide interactions using protein building blocks
Predicting peptide interactions using protein building blocksPeter Vanhee
 
Going serverless at Comic Relief
Going serverless at Comic ReliefGoing serverless at Comic Relief
Going serverless at Comic ReliefPeter Vanhee
 
Importing and synchronizing content using Feeds
Importing and synchronizing content using FeedsImporting and synchronizing content using Feeds
Importing and synchronizing content using FeedsPeter Vanhee
 
Mapping in Drupal 7 using OpenLayers
Mapping in Drupal 7 using OpenLayersMapping in Drupal 7 using OpenLayers
Mapping in Drupal 7 using OpenLayersPeter Vanhee
 
Mapping in Drupal using OpenLayers
Mapping in Drupal using OpenLayersMapping in Drupal using OpenLayers
Mapping in Drupal using OpenLayersPeter Vanhee
 

Mais de Peter Vanhee (6)

Going serverless at Comic Relief - July 2019
Going serverless at Comic Relief - July 2019Going serverless at Comic Relief - July 2019
Going serverless at Comic Relief - July 2019
 
Predicting peptide interactions using protein building blocks
Predicting peptide interactions using protein building blocksPredicting peptide interactions using protein building blocks
Predicting peptide interactions using protein building blocks
 
Going serverless at Comic Relief
Going serverless at Comic ReliefGoing serverless at Comic Relief
Going serverless at Comic Relief
 
Importing and synchronizing content using Feeds
Importing and synchronizing content using FeedsImporting and synchronizing content using Feeds
Importing and synchronizing content using Feeds
 
Mapping in Drupal 7 using OpenLayers
Mapping in Drupal 7 using OpenLayersMapping in Drupal 7 using OpenLayers
Mapping in Drupal 7 using OpenLayers
 
Mapping in Drupal using OpenLayers
Mapping in Drupal using OpenLayersMapping in Drupal using OpenLayers
Mapping in Drupal using OpenLayers
 

Último

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Building rednoseday.com on Drupal 8

  • 1. Building rednoseday.com on Drupal 8 Peter Vanhee
 Tech Lead at Comic Relief
 @pvhee DrupalCamp London 2017
  • 2. • Comic Relief strives to create a just world free from poverty • We raise millions of pounds through two big fundraising campaigns – Red Nose Day and Sport Relief. • We spend that money in the best possible way to tackle the root causes of poverty and social injustice. • We use the power of our brand to raise awareness of the issues that we care most about.
  • 3. Who am I? • Tech Lead at Comic Relief 
 https://technology.comicrelief.com • Founder of Marzee Labs, a tech shop from Barcelona @marzeelabs • Long-time Drupal contributor @pvhee
  • 4. Drupal at Comic Relief • 2014: comicrelief.com • 2015: 2015.rednoseday.com • 2016: sportrelief.com
  • 5.
  • 6. Drupal at Comic Relief • 2014: comicrelief.com • 2015: 2015.rednoseday.com • 2016: sportrelief.com • 2017: rednoseday.com
  • 7. A fresh start? • Build a campaign website • Build a product that can build campaign websites • Build a product that allows editors to reorganise row components to build a website • Continuously iterate over our codebase
  • 8. A product should… • support iterative development • have a clear versioning scheme • have tests to guarantee quality • provide a sensible default start for any campaign • allow for customisation
  • 9. Technology Choice? Drupal 8, because of • embracing industry PHP standards • built on top of Symfony, use of Twig and Composer • editorial features “out of the box” • accessibility features • built-in REST capabilities • a development challenge
  • 10. You can’t be that kid standing at the top of the waterslide, overthinking it. You have to go down the chute.
 Tina Fey
  • 11. Ingredients to build our product • Focus on Editor Experience • Automate and streamline • Decoupled services
  • 13. Landing pages as the norm • First iteration: panels with panelizer • Second iteration: panels with panelizer and embedded paragraphs • Third iteration: paragraphs with block reference
  • 14. Header with Menu Footer Paragraph 1 Paragraph 2 Paragraph 3 Paragraph n … library of blocks custom blocks 
 (like email signup) Editorial blocks Paragraph types “content wall”
 (rows + teasers are blocks) Cards blocks are reusable paragraphs are not reusable Quotes Embed Node Block reference
  • 15. BLOCKS PARAGRAPHS reusable not reusable libraryquick edit contextual links only editable via node no quick-edit
 (see node …) content fields layout fields reference
  • 17.
  • 18.
  • 19. Living Style Guide • Using KSS, “a documentation syntax for CSS” • Our new “incubation area” • Code and style guide are one — no need to update one or the other independently thus guaranteeing it stays fresh!
  • 20. Style-guide driven development Component idea Style Guide
 (or Pattern Lab)
 
 HTML, SCSS, JS Review
 Multi-device QA Sign-off Drupal development
 
 Content model
 View modes
 Component module
 Twig / PHP

  • 21. Improved editor experience Red Nose Day 2015
 (Drupal 7) Red Nose Day 2017
 (Drupal 8)
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 28. A build in one step • Package up our website product using an installation profile and using CMI, via config_devel • Default content in JSON • Use a build tool — we use Phing and run 
 phing build often
  • 31. No automation without tests • Code quality checks using CodeSniffer, phpmd, phpcpd • Configuration checks using config_devel • Distribution installation tests using phing build • Behavior tests on distribution using Behat • Drupal log checks (no errors, warnings generated by Behat) • Visual regression tests using BBC Wraith
  • 37. Minimise custom code • we have around 2000 custom lines of PHP code (options callbacks, custom Display Suite fields, Solr tweaks) • “Non-glue code” is contributed back as standalone Drupal modules: rabbitmq, social_links
  • 39. The Queue Pattern Producer = Drupal Queue Consumer = 3rd party an example: email list subscription
 - Producer: Email Signup Form
 - Queue: holds email address, template ID, etc.
 - Consumer: PHP / nodejs app talking to MailChimp

  • 40. Drupal Producer/** * Our signup form. */ class ExampleForm extends FormBase { public function buildForm(array $form, Form…face $form_state) { $form['email'] = [ '#type' => 'email', '#title' => $this->t(‘Your email address.'), ]; $form['show'] = [ '#type' => 'submit', '#value' => $this->t('Submit'), ]; return $form; } public function submitForm(array &$form, Form…face $form_state) { // Get the data you want to send to the queue. $data = $form_state->getValue('email'); // Get the queue config and send it to the data to the queue. $queue_name = 'queue1'; $queue_factory = Drupal::service('queue'); $queue = $queue_factory->get($queue_name); $queue->createItem($data); // Send some feedback. drupal_set_message( $this->t(‘Added data to queue @queue: @email', [ '@queue' => $queue_name, '@email' => $form_state->getValue('email'), ]) ); } } // Our rabbitmq.config.yml configuration exchanges: my_exchange: type: 'direct' passive: false durable: true auto_delete: false internal: false nowait: false queues: my_queue: passive: false durable: false exclusive: false auto_delete: true nowait: false routing_keys: - 'my_exchange.my_queue' // Add to settings.php $settings['queue_service_queue1'] = 
 'queue.rabbitmq'; rabbitmq module at 
 drupal.org/project/rabbitmq using Drupal 8 Queue API
  • 42. 3-rd party Consumer class QueueConsumer implements ConsumerInterface { /* @var stdClass */ private $processingService; /** * Parse message as JSON and send to processor * * @param AMQPMessage $msg * @return bool */ public function execute(AMQPMessage $msg) { if ($decodedMessage = json_decode($msg->body)) { try { return $this->processingService->process($decodedMessage); } catch (Exception $e) { $this->logger->alert(‘Queue process error:' . $e->getMessage()); } } else { $this->logger->info(sprintf('Unable to parse as JSON: "%s"', $msg->body)); } return false; } }
  • 43. Towards micro-services • oEmbed / iFrame for integrating 3rd-party apps in the CMS • Message Queues for decoupling logic
  • 45. From product to website campaign 
 distribution
 - v1.1
 - … 
 - v1.36
 - … 
 - v2.x rednoseday.com
 comicrelief.com rednoseday.org (USA) sportrelief.com
  • 46. From product to website campaign 
 distribution
 - v1.1
 - … 
 - v1.36
 - … 
 - v2.x rednoseday.com
 - campaign v1.36 as dependency - env vars (queue info, db info, …)
 - RND17 theme
 - YML site configuration sites/ default/config - composer / make - hook_update
 - drush config-devel-import comicrelief.com rednoseday.org (USA) sportrelief.com you?