SlideShare a Scribd company logo
Modernize Your Drupal Development 
Chris Tankersley 
php[world] 2014
2 
Who Am I? 
● A PHP Developer for 10 Years 
● Drupal Dev for 4 years 
● Lots of projects no one uses, and a few 
some do 
● https://github.com/dragonmantank
3 
We've got a lot to cover 
● Development Environments 
● Version Control 
● drush 
● Coding Standards 
● Building Better Modules 
● Moving Out of the Database 
● Putting it all together
4 
Development Environments
5 
Local Stack 
● Run everything off of your local 
machine! 
● Most performant of the options
6 
Local Stack 
● Not very portable 
● More junk on your PC to maintain 
● Probably not at all like Production
7 
Don't use Portable *AMP stacks
8 
If you have to... 
● Acquia Dev Desktop 
● Zend Server
9 
Acquia Dev Desktop 
● Pre-built *AMP Stack 
● Available for Drupal 6 or 7 
● Install and Ready to Go
10 
Acquia Dev Desktop 
● Not built for multiple installs 
● Can’t use for existing sites 
● Only for Windows and Mac
11 
Zend Server 
● Uses OS's server 
● Has some cool tools like Z-Ray 
● Mostly a wrapper around the local stack 
● Support! 
● Has a Development and Production 
version
12 
Zend Server 
● Weird issues with permissions 
● Works best with other Zend tools 
● Pricey
13 
How it looks 
Your OS 
Applications 
Your App 
Web Server DB Server
14 
docker 
● Containers for applications 
● Makes deployment very easy 
● Very easy to get set up 
● Way more performant than VMs
15 
docker 
● If you're not on Linux, think really hard 
about using 
● Mostly a deployment fixer
16 
How it looks - Linux 
Your OS 
Applications 
Your App 
Web Server DB Server
17 
How it looks – Everywhere Else 
Your App 
Web Server DB Server 
Virtualized OS 
Applications Virtualization Layer 
Your OS
18 
vagrant 
● Full server to run code 
● Self contained and can be replicated 
● Most modern machines can do VM
19 
vagrant 
● Uses more resources 
● Easier to break 
● When it breaks, it breaks hard
20 
How it looks 
Your App 
Web Server DB Server 
Virtualized OS 
Applications Virtualization Layer 
Your OS
21 
A quick demo
22 
Considerations 
● How special is my Production environment? 
● What resources do my dev machines have? 
● How many things am I working on? 
● What's the tech level of my coworkers? 
● What's the tech level of my clients?
23 
Version Control
24 
What is version control? 
● Some system that keeps track of 
changes to source code
25 
Many different systems 
● Git 
● Subversions 
● Mercurial
26 
It doesn't matter which one you use
27 
A Quick Demo
28 
Workflows 
● Github/Pull Request 
● Gitflow 
● Rebase
29 
GitHub Workflow
30 
For more info... 
https://guides.github.com/introduction/flow/index.html
31 
Rebase Workflow
32 
For more info... 
http://randyfay.com/content/rebase-workflow-git
33 
gitflow
34 
develop master 
Tag: 0.9.2 
blog_rework staff_page v0.9 
Tag: 1.0.0 
v1.0 
Tag: 0.9.3
35 
For more info... 
http://nvie.com/posts/a-successful-git-branching-model/
36 
Jeff Carouth's „Git and Github – Working 
Effectively on a Team“ 
https://speakerdeck.com/jcarouth/git-and-github- 
working-effectively-on-a-team-at-php-tek- 
2014
37 
Any questions?
38 
Are we finally ready for some actual Drupal?
39
40 
drush
41 
What is drush?
42 
What is drush? 
● Command line interface for (much of) 
Drupal 
● Allows modules to be CLI driven 
● Much, much quicker than the GUI
43 
How does it work?
44 
Common Commands
45 
Download Drupal 
$ drush dl drupal --drupal-project-rename="drupal" 
Project drupal (7.32) downloaded to /vagrant/drupal-7.32. 
[success] 
Project drupal contains: 
[success] 
- 3 profiles: testing, standard, minimal 
- 4 themes: stark, seven, garland, bartik 
- 47 modules: drupal_system_listing_incompatible_test, 
drupal_system_listing_compatible_test, user, update, trigger, translation, tracker, 
toolbar, taxonomy, system, syslog, statistics, simpletest, shortcut, search, rdf, profile, 
poll, php, path, 
overlay, openid, node, menu, locale, image, help, forum, filter, file, field_ui, text, 
options, number, list, field_sql_storage, field, dblog, dashboard, contextual, contact, 
comment, color, book, blog, block, aggregator
46 
Install Drupal 
$ drush site-install standard -y --db-url=mysql://drupal:DrupalR0cks@localhost/drupaldb 
--account-name=admin --account-pass=admin --site-name="My Drupal Site" --site-mail= 
youremail@domain.com
47 
Run a development server 
$ drush runserver 8080 
$ drush runserver 0.0.0.0:8080
48 
Watching the Watchdog 
// Show the last 10 messages 
$ drush watchdog-show 
// Show the last 50 messages 
$ drush watchdog-show --count=50 
// Show only entries of a specific severity 
$ drush watchdog-show --severity=notice 
// Search for a specific message 
$ drush watchdog-show "cron run successful"
49 
Viewing Watchdog Entries 
$ drush watchdog-show 54 
ID : 54 
Date : 30/Jan 22:10 
Type : system 
Severity : info 
Message : overlay module disabled.
50 
Cleaning Up After the (Watch)dog 
// Destroy it all! 
$ drush watchdog-delete all 
// Delete a specific one to hide an error you generated that no one can know about 
$ drush watchdog-delete 50 
// Delete all messages containing a string 
$ drush watchdog-delete "cron run successfull" 
// Delete everything of a specific severity 
$ drush watchdog-delete --severity=debug
51 
Working with modules 
$ drush pm-download backup_migrate 
$ drush pm-enable backup_migrate 
$ drush pm-update
52 
drush Aliases 
● Allows you to tell drush where an 
external site is located at 
● Requires drush on the other end, and 
shell access
53 
Creating an alias 
// sites/all/drush/prod.alias.drushrc.php 
$aliases['prod'] = array( 
'uri' => 'mysite.com', 
'root' => '/public_html/', 
'remote-host' => '10.0.2.2', 
'remote-user' => 'mysite', 
);
54 
Using an alias 
$ drush @prod status 
PHP configuration : /Applications/acquia-drupal/php5_3/bin/php.ini 
Drush version : 5.7 
Drush configuration :
55 
Common uses for aliases 
$ drush rsync sites/default/files/ @prod:sites/default/files 
$ drush sql-sync @prod @self 
$ drush @prod site-install standard [...]
56 
Deploying code with drush 
$ drush rsync @self @prod 
You will destroy data from ctankersley@10.0.2.2:'~/Sites/deploy/' and 
replace with data from /vagrant/ 
Do you really want to continue? (y/n): y
57 
Questions?
58 
Coding Standards
59 
Huh? 
Coding standards are a list of rules regarding 
the layout and structure of source code.
60 
What? 
● Two space indents 
● Spaces between casts 
– $id = (int) $_POST['id']; 
● Not using else if, using elseif 
● Always using curly braces on control 
structures
61 
Why? 
● Makes it easy to read code 
● Makes it easy to merge code 
● You're on a team, act like it 
● If you want your code on drupal.org, you're 
going to need to follow it 
● If you want to contribute, you'll need to follow it
62 
For the nitty-gritty... 
● https://www.drupal.org/coding-standards
63 
Tools 
● Code Sniffer with Drupal rules 
● Coder 
● PAReview 
● Grammer Parser
64 
Code Sniffer 
● Compares your code to some coding 
standard 
● General PHP tool, not specific to Drupal 
● CLI
65 
Code Sniffer 
https://www.drupal.org/node/1419988
66 
Demo Time
67 
Coder 
● GUI to check your code against coding 
standards 
● https://www.drupal.org/project/coder
68 
Demo Time
69 
PAReview 
● Project Application Review 
● First line of defense against bad 
modules 
● Online code sniffer for drupal.org
70 
Self Hosted 
● Add the Drupal, DrupalSecure, 
DrupalPractice, and Codespell 
standards to CodeSniffer 
● Download the bash script from Github
71 
Install DrupalPractice 
$ git clone https://github.com/klausi/drupalpractice.git ~/.drush/drupalpractice 
$ ln -sv ~/.drush/drupalpractice/DrupalPractice 
~/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/
72 
Quick Demo
73 
Questions?
74 
Building Better Modules
75 
Drupal supplies a lot of things for you 
● Form API 
● Schema API 
● Theme Layer 
● Unit Testing 
● Entities
76 
Unit Testing
77 
How Test Driven Development works 
● Write your tests before your code 
● Watch it fail 
● Write code to make your test pass 
● Feel better! (and refactor)
78 
TDD In Drupal 
● Drupal ships with SimpleTest baked in 
● Supports unit testing and functional testing 
● Unit tests are done by extending 
DrupalUnitTestCase 
● Functional tests are done by extending 
DrupalWebTestCase
79 
Unit Tests vs Functional Tests 
● Unit tests should focus on testing an 
individual piece of code 
● Functional tests should focus on testing 
output/pages
80 
Unit Tests vs Functional Tests 
● Unit tests do not bootstrap Drupal, so 
are very quick 
● Functional tests do bootstrap Drupal, so 
are very slow
81 
Downsides to TDD in Drupal 
● The GUI is an AJAX runner, which breaks a lot 
– Use drush for a better experience 
● Debugging can be very hard, since the 
environment is created and destroyed each 
test 
– Use $this->verbose() or debug()
82 
Let's build a test
83 
Let's build a test
84 
Caching and Asset Aggregation 
● Drupal has a caching layer 
● Drupal has a basic asset pipeline
85 
Turn it on on Performance
86 
Turn it on on Performance
87 
Caching 
● Caching saves a chunk of the render 
array to the DB 
● Caching still requires a DB hit
88 
Two Different Caches 
● Page caching for full output 
● Block caching for dynamic content
89 
Asset Aggregation 
● Groups CSS and JS together, reducing 
HTTP calls 
● Will minify the CSS, reducing the 
transmission size
90 
Easy to take advantage of 
● Let Drupal know about your files 
– drupal_add_js() 
– drupal_add_css() 
– Through #attached 
– Add it to your .info file 
● Don't just add straight to templates
91 
Adding JS
92 
Using #attached
93 
Entities 
● Basic building blocks of 'things' in 
Drupal 
● You already use them 
● Entity API provides an interface for 
making your own
94 
Why use them? 
● Drupal takes care of a lot of scaffolding 
● Allows site builders to extend them
95 
What is an entity? 
● A [Drupalized] thing 
● Series of classes and functions that tell 
Drupal how to deal with your thing
96 
What do we need? 
● A dependency on the Entities module
97 
A place to store things...
98 
And now we create a class for our entity
99 
And now we tell Drupal about it
100 
Let's create an admin form
101 
Now let's use it!
102 
Moving Out of the Database
103 
The Database Sucks 
● Drupal stores a lot of things in the 
database 
● Databases are hard to version 
● Database info is hard to move
104 
Features! 
● Features allow you to package up stuff 
into modules 
● Makes deploying code much easier
105 
Bundle things together
106 
Bundle lots of things
107
108 
Questions?
109 
Thanks! 
● http://joind.in/talk/view/11901 
● @dragonmantank 
● chris@ctankersley.com
Ad

More Related Content

What's hot (20)

Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
Jérôme Petazzoni
 
Ganeti Web Manager: Cluster Management Made Simple
Ganeti Web Manager: Cluster Management Made SimpleGaneti Web Manager: Cluster Management Made Simple
Ganeti Web Manager: Cluster Management Made Simple
OSCON Byrum
 
Hands on Virtualization with Ganeti (part 1) - LinuxCon 2012
Hands on Virtualization with Ganeti (part 1)  - LinuxCon 2012Hands on Virtualization with Ganeti (part 1)  - LinuxCon 2012
Hands on Virtualization with Ganeti (part 1) - LinuxCon 2012
Lance Albertson
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
corehard_by
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Dana Luther
 
Hands on Virtualization with Ganeti
Hands on Virtualization with GanetiHands on Virtualization with Ganeti
Hands on Virtualization with Ganeti
OSCON Byrum
 
Aug penguin16
Aug penguin16Aug penguin16
Aug penguin16
alhino
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
Kris Buytaert
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Arun Ganesh
 
Tech Talk - Vagrant
Tech Talk - VagrantTech Talk - Vagrant
Tech Talk - Vagrant
Thomas Krille
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
Mando Stam
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
CodeOps Technologies LLP
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
arunkumar sadhasivam
 
How to swim with a whale
How to swim with a whaleHow to swim with a whale
How to swim with a whale
Łukasz Siudut
 
Docker 1.11
Docker 1.11Docker 1.11
Docker 1.11
Maciej Lasyk
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Aleksey Tkachenko
 
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Ron Munitz
 
Developing web apps
Developing web appsDeveloping web apps
Developing web apps
Michael Dyrynda
 
Of Docker and Drupal
Of Docker and DrupalOf Docker and Drupal
Of Docker and Drupal
Gerald Villorente
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding style
Bo-Yi Wu
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
Jérôme Petazzoni
 
Ganeti Web Manager: Cluster Management Made Simple
Ganeti Web Manager: Cluster Management Made SimpleGaneti Web Manager: Cluster Management Made Simple
Ganeti Web Manager: Cluster Management Made Simple
OSCON Byrum
 
Hands on Virtualization with Ganeti (part 1) - LinuxCon 2012
Hands on Virtualization with Ganeti (part 1)  - LinuxCon 2012Hands on Virtualization with Ganeti (part 1)  - LinuxCon 2012
Hands on Virtualization with Ganeti (part 1) - LinuxCon 2012
Lance Albertson
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
corehard_by
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Dana Luther
 
Hands on Virtualization with Ganeti
Hands on Virtualization with GanetiHands on Virtualization with Ganeti
Hands on Virtualization with Ganeti
OSCON Byrum
 
Aug penguin16
Aug penguin16Aug penguin16
Aug penguin16
alhino
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
Kris Buytaert
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Arun Ganesh
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
Mando Stam
 
How to swim with a whale
How to swim with a whaleHow to swim with a whale
How to swim with a whale
Łukasz Siudut
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Aleksey Tkachenko
 
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Ron Munitz
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding style
Bo-Yi Wu
 

Similar to Modernize Your Drupal Development (20)

Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and more
Acquia
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
Philip Norton
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Paul McKibben
 
Face your fears: Drush and Aegir
Face your fears: Drush and AegirFace your fears: Drush and Aegir
Face your fears: Drush and Aegir
Iztok Smolic
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
Pantheon
 
Super powered Drupal development with docker
Super powered Drupal development with dockerSuper powered Drupal development with docker
Super powered Drupal development with docker
Maciej Lukianski
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLA
Jesus Manuel Olivas
 
Drupal 8 - Improving your development workflow
Drupal 8 - Improving your development workflowDrupal 8 - Improving your development workflow
Drupal 8 - Improving your development workflow
valuebound
 
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Jeff Geerling
 
Drupal + composer = new love !?
Drupal + composer = new love !?Drupal + composer = new love !?
Drupal + composer = new love !?
nuppla
 
Docker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentDocker4Drupal 2.1 for Development
Docker4Drupal 2.1 for Development
Websolutions Agency
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
Andrii Podanenko
 
Drush workshop
Drush workshopDrush workshop
Drush workshop
Juampy NR
 
Cloudera hadoop installation
Cloudera hadoop installationCloudera hadoop installation
Cloudera hadoop installation
Sumitra Pundlik
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
Massimiliano Dessì
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Leo Lorieri
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios
 
Drupal Overview For Techies
Drupal Overview For TechiesDrupal Overview For Techies
Drupal Overview For Techies
Robert Carr
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
Nuvole
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and more
Acquia
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
Philip Norton
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Paul McKibben
 
Face your fears: Drush and Aegir
Face your fears: Drush and AegirFace your fears: Drush and Aegir
Face your fears: Drush and Aegir
Iztok Smolic
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
Pantheon
 
Super powered Drupal development with docker
Super powered Drupal development with dockerSuper powered Drupal development with docker
Super powered Drupal development with docker
Maciej Lukianski
 
Improving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLAImproving your Drupal 8 development workflow DrupalCampLA
Improving your Drupal 8 development workflow DrupalCampLA
Jesus Manuel Olivas
 
Drupal 8 - Improving your development workflow
Drupal 8 - Improving your development workflowDrupal 8 - Improving your development workflow
Drupal 8 - Improving your development workflow
valuebound
 
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Jeff Geerling
 
Drupal + composer = new love !?
Drupal + composer = new love !?Drupal + composer = new love !?
Drupal + composer = new love !?
nuppla
 
Docker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentDocker4Drupal 2.1 for Development
Docker4Drupal 2.1 for Development
Websolutions Agency
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
Andrii Podanenko
 
Drush workshop
Drush workshopDrush workshop
Drush workshop
Juampy NR
 
Cloudera hadoop installation
Cloudera hadoop installationCloudera hadoop installation
Cloudera hadoop installation
Sumitra Pundlik
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Leo Lorieri
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios
 
Drupal Overview For Techies
Drupal Overview For TechiesDrupal Overview For Techies
Drupal Overview For Techies
Robert Carr
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
Nuvole
 
Ad

More from Chris Tankersley (20)

Docker is Dead: Long Live Containers
Docker is Dead: Long Live ContainersDocker is Dead: Long Live Containers
Docker is Dead: Long Live Containers
Chris Tankersley
 
Bend time to your will with git
Bend time to your will with gitBend time to your will with git
Bend time to your will with git
Chris Tankersley
 
Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)
Chris Tankersley
 
Dead Simple APIs with OpenAPI
Dead Simple APIs with OpenAPIDead Simple APIs with OpenAPI
Dead Simple APIs with OpenAPI
Chris Tankersley
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
Chris Tankersley
 
You Got Async in my PHP!
You Got Async in my PHP!You Got Async in my PHP!
You Got Async in my PHP!
Chris Tankersley
 
Docker for Developers - PHP Detroit 2018
Docker for Developers - PHP Detroit 2018Docker for Developers - PHP Detroit 2018
Docker for Developers - PHP Detroit 2018
Chris Tankersley
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
Chris Tankersley
 
They are Watching You
They are Watching YouThey are Watching You
They are Watching You
Chris Tankersley
 
BASHing at the CLI - Midwest PHP 2018
BASHing at the CLI - Midwest PHP 2018BASHing at the CLI - Midwest PHP 2018
BASHing at the CLI - Midwest PHP 2018
Chris Tankersley
 
You Were Lied To About Optimization
You Were Lied To About OptimizationYou Were Lied To About Optimization
You Were Lied To About Optimization
Chris Tankersley
 
Docker for PHP Developers - php[world] 2017
Docker for PHP Developers - php[world] 2017Docker for PHP Developers - php[world] 2017
Docker for PHP Developers - php[world] 2017
Chris Tankersley
 
Docker for PHP Developers - Madison PHP 2017
Docker for PHP Developers - Madison PHP 2017Docker for PHP Developers - Madison PHP 2017
Docker for PHP Developers - Madison PHP 2017
Chris Tankersley
 
Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017
Chris Tankersley
 
Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017
Chris Tankersley
 
OOP Is More Then Cars and Dogs - Midwest PHP 2017
OOP Is More Then Cars and Dogs - Midwest PHP 2017OOP Is More Then Cars and Dogs - Midwest PHP 2017
OOP Is More Then Cars and Dogs - Midwest PHP 2017
Chris Tankersley
 
From Docker to Production - SunshinePHP 2017
From Docker to Production - SunshinePHP 2017From Docker to Production - SunshinePHP 2017
From Docker to Production - SunshinePHP 2017
Chris Tankersley
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHP
Chris Tankersley
 
Coming to Terms with OOP In Drupal - php[world] 2016
Coming to Terms with OOP In Drupal - php[world] 2016Coming to Terms with OOP In Drupal - php[world] 2016
Coming to Terms with OOP In Drupal - php[world] 2016
Chris Tankersley
 
How We Got Here: A Brief History of Open Source
How We Got Here: A Brief History of Open SourceHow We Got Here: A Brief History of Open Source
How We Got Here: A Brief History of Open Source
Chris Tankersley
 
Docker is Dead: Long Live Containers
Docker is Dead: Long Live ContainersDocker is Dead: Long Live Containers
Docker is Dead: Long Live Containers
Chris Tankersley
 
Bend time to your will with git
Bend time to your will with gitBend time to your will with git
Bend time to your will with git
Chris Tankersley
 
Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)Using PHP Functions! (Not those functions, Google Cloud Functions)
Using PHP Functions! (Not those functions, Google Cloud Functions)
Chris Tankersley
 
Dead Simple APIs with OpenAPI
Dead Simple APIs with OpenAPIDead Simple APIs with OpenAPI
Dead Simple APIs with OpenAPI
Chris Tankersley
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
Chris Tankersley
 
Docker for Developers - PHP Detroit 2018
Docker for Developers - PHP Detroit 2018Docker for Developers - PHP Detroit 2018
Docker for Developers - PHP Detroit 2018
Chris Tankersley
 
BASHing at the CLI - Midwest PHP 2018
BASHing at the CLI - Midwest PHP 2018BASHing at the CLI - Midwest PHP 2018
BASHing at the CLI - Midwest PHP 2018
Chris Tankersley
 
You Were Lied To About Optimization
You Were Lied To About OptimizationYou Were Lied To About Optimization
You Were Lied To About Optimization
Chris Tankersley
 
Docker for PHP Developers - php[world] 2017
Docker for PHP Developers - php[world] 2017Docker for PHP Developers - php[world] 2017
Docker for PHP Developers - php[world] 2017
Chris Tankersley
 
Docker for PHP Developers - Madison PHP 2017
Docker for PHP Developers - Madison PHP 2017Docker for PHP Developers - Madison PHP 2017
Docker for PHP Developers - Madison PHP 2017
Chris Tankersley
 
Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017Docker for Developers - php[tek] 2017
Docker for Developers - php[tek] 2017
Chris Tankersley
 
Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017
Chris Tankersley
 
OOP Is More Then Cars and Dogs - Midwest PHP 2017
OOP Is More Then Cars and Dogs - Midwest PHP 2017OOP Is More Then Cars and Dogs - Midwest PHP 2017
OOP Is More Then Cars and Dogs - Midwest PHP 2017
Chris Tankersley
 
From Docker to Production - SunshinePHP 2017
From Docker to Production - SunshinePHP 2017From Docker to Production - SunshinePHP 2017
From Docker to Production - SunshinePHP 2017
Chris Tankersley
 
Docker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHPDocker for Developers - Sunshine PHP
Docker for Developers - Sunshine PHP
Chris Tankersley
 
Coming to Terms with OOP In Drupal - php[world] 2016
Coming to Terms with OOP In Drupal - php[world] 2016Coming to Terms with OOP In Drupal - php[world] 2016
Coming to Terms with OOP In Drupal - php[world] 2016
Chris Tankersley
 
How We Got Here: A Brief History of Open Source
How We Got Here: A Brief History of Open SourceHow We Got Here: A Brief History of Open Source
How We Got Here: A Brief History of Open Source
Chris Tankersley
 
Ad

Recently uploaded (20)

SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 

Modernize Your Drupal Development

  • 1. Modernize Your Drupal Development Chris Tankersley php[world] 2014
  • 2. 2 Who Am I? ● A PHP Developer for 10 Years ● Drupal Dev for 4 years ● Lots of projects no one uses, and a few some do ● https://github.com/dragonmantank
  • 3. 3 We've got a lot to cover ● Development Environments ● Version Control ● drush ● Coding Standards ● Building Better Modules ● Moving Out of the Database ● Putting it all together
  • 5. 5 Local Stack ● Run everything off of your local machine! ● Most performant of the options
  • 6. 6 Local Stack ● Not very portable ● More junk on your PC to maintain ● Probably not at all like Production
  • 7. 7 Don't use Portable *AMP stacks
  • 8. 8 If you have to... ● Acquia Dev Desktop ● Zend Server
  • 9. 9 Acquia Dev Desktop ● Pre-built *AMP Stack ● Available for Drupal 6 or 7 ● Install and Ready to Go
  • 10. 10 Acquia Dev Desktop ● Not built for multiple installs ● Can’t use for existing sites ● Only for Windows and Mac
  • 11. 11 Zend Server ● Uses OS's server ● Has some cool tools like Z-Ray ● Mostly a wrapper around the local stack ● Support! ● Has a Development and Production version
  • 12. 12 Zend Server ● Weird issues with permissions ● Works best with other Zend tools ● Pricey
  • 13. 13 How it looks Your OS Applications Your App Web Server DB Server
  • 14. 14 docker ● Containers for applications ● Makes deployment very easy ● Very easy to get set up ● Way more performant than VMs
  • 15. 15 docker ● If you're not on Linux, think really hard about using ● Mostly a deployment fixer
  • 16. 16 How it looks - Linux Your OS Applications Your App Web Server DB Server
  • 17. 17 How it looks – Everywhere Else Your App Web Server DB Server Virtualized OS Applications Virtualization Layer Your OS
  • 18. 18 vagrant ● Full server to run code ● Self contained and can be replicated ● Most modern machines can do VM
  • 19. 19 vagrant ● Uses more resources ● Easier to break ● When it breaks, it breaks hard
  • 20. 20 How it looks Your App Web Server DB Server Virtualized OS Applications Virtualization Layer Your OS
  • 21. 21 A quick demo
  • 22. 22 Considerations ● How special is my Production environment? ● What resources do my dev machines have? ● How many things am I working on? ● What's the tech level of my coworkers? ● What's the tech level of my clients?
  • 24. 24 What is version control? ● Some system that keeps track of changes to source code
  • 25. 25 Many different systems ● Git ● Subversions ● Mercurial
  • 26. 26 It doesn't matter which one you use
  • 27. 27 A Quick Demo
  • 28. 28 Workflows ● Github/Pull Request ● Gitflow ● Rebase
  • 30. 30 For more info... https://guides.github.com/introduction/flow/index.html
  • 32. 32 For more info... http://randyfay.com/content/rebase-workflow-git
  • 34. 34 develop master Tag: 0.9.2 blog_rework staff_page v0.9 Tag: 1.0.0 v1.0 Tag: 0.9.3
  • 35. 35 For more info... http://nvie.com/posts/a-successful-git-branching-model/
  • 36. 36 Jeff Carouth's „Git and Github – Working Effectively on a Team“ https://speakerdeck.com/jcarouth/git-and-github- working-effectively-on-a-team-at-php-tek- 2014
  • 38. 38 Are we finally ready for some actual Drupal?
  • 39. 39
  • 41. 41 What is drush?
  • 42. 42 What is drush? ● Command line interface for (much of) Drupal ● Allows modules to be CLI driven ● Much, much quicker than the GUI
  • 43. 43 How does it work?
  • 45. 45 Download Drupal $ drush dl drupal --drupal-project-rename="drupal" Project drupal (7.32) downloaded to /vagrant/drupal-7.32. [success] Project drupal contains: [success] - 3 profiles: testing, standard, minimal - 4 themes: stark, seven, garland, bartik - 47 modules: drupal_system_listing_incompatible_test, drupal_system_listing_compatible_test, user, update, trigger, translation, tracker, toolbar, taxonomy, system, syslog, statistics, simpletest, shortcut, search, rdf, profile, poll, php, path, overlay, openid, node, menu, locale, image, help, forum, filter, file, field_ui, text, options, number, list, field_sql_storage, field, dblog, dashboard, contextual, contact, comment, color, book, blog, block, aggregator
  • 46. 46 Install Drupal $ drush site-install standard -y --db-url=mysql://drupal:DrupalR0cks@localhost/drupaldb --account-name=admin --account-pass=admin --site-name="My Drupal Site" --site-mail= [email protected]
  • 47. 47 Run a development server $ drush runserver 8080 $ drush runserver 0.0.0.0:8080
  • 48. 48 Watching the Watchdog // Show the last 10 messages $ drush watchdog-show // Show the last 50 messages $ drush watchdog-show --count=50 // Show only entries of a specific severity $ drush watchdog-show --severity=notice // Search for a specific message $ drush watchdog-show "cron run successful"
  • 49. 49 Viewing Watchdog Entries $ drush watchdog-show 54 ID : 54 Date : 30/Jan 22:10 Type : system Severity : info Message : overlay module disabled.
  • 50. 50 Cleaning Up After the (Watch)dog // Destroy it all! $ drush watchdog-delete all // Delete a specific one to hide an error you generated that no one can know about $ drush watchdog-delete 50 // Delete all messages containing a string $ drush watchdog-delete "cron run successfull" // Delete everything of a specific severity $ drush watchdog-delete --severity=debug
  • 51. 51 Working with modules $ drush pm-download backup_migrate $ drush pm-enable backup_migrate $ drush pm-update
  • 52. 52 drush Aliases ● Allows you to tell drush where an external site is located at ● Requires drush on the other end, and shell access
  • 53. 53 Creating an alias // sites/all/drush/prod.alias.drushrc.php $aliases['prod'] = array( 'uri' => 'mysite.com', 'root' => '/public_html/', 'remote-host' => '10.0.2.2', 'remote-user' => 'mysite', );
  • 54. 54 Using an alias $ drush @prod status PHP configuration : /Applications/acquia-drupal/php5_3/bin/php.ini Drush version : 5.7 Drush configuration :
  • 55. 55 Common uses for aliases $ drush rsync sites/default/files/ @prod:sites/default/files $ drush sql-sync @prod @self $ drush @prod site-install standard [...]
  • 56. 56 Deploying code with drush $ drush rsync @self @prod You will destroy data from [email protected]:'~/Sites/deploy/' and replace with data from /vagrant/ Do you really want to continue? (y/n): y
  • 59. 59 Huh? Coding standards are a list of rules regarding the layout and structure of source code.
  • 60. 60 What? ● Two space indents ● Spaces between casts – $id = (int) $_POST['id']; ● Not using else if, using elseif ● Always using curly braces on control structures
  • 61. 61 Why? ● Makes it easy to read code ● Makes it easy to merge code ● You're on a team, act like it ● If you want your code on drupal.org, you're going to need to follow it ● If you want to contribute, you'll need to follow it
  • 62. 62 For the nitty-gritty... ● https://www.drupal.org/coding-standards
  • 63. 63 Tools ● Code Sniffer with Drupal rules ● Coder ● PAReview ● Grammer Parser
  • 64. 64 Code Sniffer ● Compares your code to some coding standard ● General PHP tool, not specific to Drupal ● CLI
  • 65. 65 Code Sniffer https://www.drupal.org/node/1419988
  • 67. 67 Coder ● GUI to check your code against coding standards ● https://www.drupal.org/project/coder
  • 69. 69 PAReview ● Project Application Review ● First line of defense against bad modules ● Online code sniffer for drupal.org
  • 70. 70 Self Hosted ● Add the Drupal, DrupalSecure, DrupalPractice, and Codespell standards to CodeSniffer ● Download the bash script from Github
  • 71. 71 Install DrupalPractice $ git clone https://github.com/klausi/drupalpractice.git ~/.drush/drupalpractice $ ln -sv ~/.drush/drupalpractice/DrupalPractice ~/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/
  • 75. 75 Drupal supplies a lot of things for you ● Form API ● Schema API ● Theme Layer ● Unit Testing ● Entities
  • 77. 77 How Test Driven Development works ● Write your tests before your code ● Watch it fail ● Write code to make your test pass ● Feel better! (and refactor)
  • 78. 78 TDD In Drupal ● Drupal ships with SimpleTest baked in ● Supports unit testing and functional testing ● Unit tests are done by extending DrupalUnitTestCase ● Functional tests are done by extending DrupalWebTestCase
  • 79. 79 Unit Tests vs Functional Tests ● Unit tests should focus on testing an individual piece of code ● Functional tests should focus on testing output/pages
  • 80. 80 Unit Tests vs Functional Tests ● Unit tests do not bootstrap Drupal, so are very quick ● Functional tests do bootstrap Drupal, so are very slow
  • 81. 81 Downsides to TDD in Drupal ● The GUI is an AJAX runner, which breaks a lot – Use drush for a better experience ● Debugging can be very hard, since the environment is created and destroyed each test – Use $this->verbose() or debug()
  • 82. 82 Let's build a test
  • 83. 83 Let's build a test
  • 84. 84 Caching and Asset Aggregation ● Drupal has a caching layer ● Drupal has a basic asset pipeline
  • 85. 85 Turn it on on Performance
  • 86. 86 Turn it on on Performance
  • 87. 87 Caching ● Caching saves a chunk of the render array to the DB ● Caching still requires a DB hit
  • 88. 88 Two Different Caches ● Page caching for full output ● Block caching for dynamic content
  • 89. 89 Asset Aggregation ● Groups CSS and JS together, reducing HTTP calls ● Will minify the CSS, reducing the transmission size
  • 90. 90 Easy to take advantage of ● Let Drupal know about your files – drupal_add_js() – drupal_add_css() – Through #attached – Add it to your .info file ● Don't just add straight to templates
  • 93. 93 Entities ● Basic building blocks of 'things' in Drupal ● You already use them ● Entity API provides an interface for making your own
  • 94. 94 Why use them? ● Drupal takes care of a lot of scaffolding ● Allows site builders to extend them
  • 95. 95 What is an entity? ● A [Drupalized] thing ● Series of classes and functions that tell Drupal how to deal with your thing
  • 96. 96 What do we need? ● A dependency on the Entities module
  • 97. 97 A place to store things...
  • 98. 98 And now we create a class for our entity
  • 99. 99 And now we tell Drupal about it
  • 100. 100 Let's create an admin form
  • 101. 101 Now let's use it!
  • 102. 102 Moving Out of the Database
  • 103. 103 The Database Sucks ● Drupal stores a lot of things in the database ● Databases are hard to version ● Database info is hard to move
  • 104. 104 Features! ● Features allow you to package up stuff into modules ● Makes deploying code much easier
  • 105. 105 Bundle things together
  • 106. 106 Bundle lots of things
  • 107. 107
  • 109. 109 Thanks! ● http://joind.in/talk/view/11901 ● @dragonmantank ● [email protected]