SlideShare a Scribd company logo
Develop a Drupal 7 project 
with Drupal 8 in mind 
Joeri van Dooren
WHOAMI 
Who Am I 
Joeri van Dooren 
Technical Coach @ SAGA Consulting Group 
@Ozmodiar 
https://www.drupal.org/u/ozmodiar
SAGA Consulting Group
Context 
• Long life span 
• A lot of custom code 
• A lot of developers 
• Drupal 8 vs Drupal 7
Challenges 
• Migration of custom code to D8 
• External libraries 
• “Big project syndrome”
Code sample: D7
Setup 
The problems… 
• Unreadable 
• Unmaintainable 
• Not testable (enough) 
• Not upgradable 
Vanilla Drupal 7 
Object Oriented Code
Setup 
Vanilla Drupal 7 
What have we done? 
• xautoload module 
• Drupal 8 class structure 
Object Oriented Code
Code sample: OO
Setup 
The problems… 
• Always re-instantiating 
classes 
• Not very maintainable 
• Not the D8 way 
Vanilla Drupal 7 
Object Oriented Code 
Dependency Injection
Setup 
Vanilla Drupal 7 
Object Oriented Code 
Dependency Injection 
What have we done?
Code sample: DI
Setup 
This is better, but… 
• Still not very readable 
• Not flexible enough 
• More D8 style, but… 
• D8 has a better solution 
Vanilla Drupal 7 
Object Oriented Code 
Dependency Injection 
Container
Vanilla Drupal 7 
Setup 
Object Oriented Code 
Dependency Injection 
Container 
What have we done? 
• Custom module 
• Symfony Container 
• D8 uses that too! 
• Copy paste library 
• xautoload module
Code sample: Container
Setup 
This is way better but… 
• Bad library maintenance 
• D8 has a better solution! 
Vanilla Drupal 7 
Object Oriented Code 
Dependency Injection 
Container 
Dependency Manager
Vanilla Drupal 7 
Setup 
Object Oriented Code 
Dependency Injection 
Container 
Dependency Manager 
What have we done? 
• Introduced Composer 
• Better library 
management 
• Libraries not in VCS 
• Drupal 8 uses that too!
Composer 
• Package Manager 
• Packagist.org or other VCS 
• composer.json 
• Vendor folder 
• Autoloading
Code sample: Composer
Setup 
Vanilla Drupal 7 
Object Oriented Code 
Dependency Injection 
Container 
Dependency Manager
Achievements 
• Easy external libraries 
• More Drupal 8 compliant 
• Object Oriented 
• Module structure 
• DI with Symfony Container 
• Less steep learning curve for D8 module dev
Extra advantages 
• Readability 
• Maintainability 
• Extensibility 
• Easy debugging 
• Better testing 
• We got off the island (in D7!)
Points of attention 
• Developers need a new mindset 
• Work around D7 limitations 
• Different code reviews
The next level 
• Run your own Packagist (or Satis) 
• Write your own interfaces to improve code 
reviews 
• Write modules as libraries with a Drupal 
module as adapter
More info 
Getting started 
http://www.saga.be/dic 
Extras 
http://youtu.be/GF0EWdsPfZ4 (dependency Injection) 
https://getcomposer.org 
http://symfony.com/doc/current/book/service_container.html
Want to know more? 
Visit SAGA at our booth
Want to know more? 
Tomorrow, because now:
Questions?

More Related Content

PPTX
Mdst3703 projects-2012-10-11
PPSX
C#.net applied OOP - Batch 3
PPTX
Generic Repository Pattern with ASP.NET MVC and EF
PPSX
Exciting features in visual studio 2017
ZIP
jQuery 1.4-1.6 Best new features
PDF
Why use Go for web development?
PPTX
PDF
The Characteristics of a Successful SPA
Mdst3703 projects-2012-10-11
C#.net applied OOP - Batch 3
Generic Repository Pattern with ASP.NET MVC and EF
Exciting features in visual studio 2017
jQuery 1.4-1.6 Best new features
Why use Go for web development?
The Characteristics of a Successful SPA

What's hot (20)

PDF
About javascript libraries
PPTX
Binding Objective-C Libraries in Xamarin.iOS
PPSX
Oop principles
PPT
EPUB for Website Producers
PPSX
Olympya web-tools 2011
PPTX
Html5
PPTX
Web Tools report
PPTX
Introduction to portable class libraries
PPTX
NOLOH PHP Framework - Unified Server-Side Development
PDF
Upgrading to Drupal 8: Benefits and Gotchas
PDF
Web Development with Delphi and React - ITDevCon 2016
PDF
Drupal 8 introduction
PPT
1st Chinaonrails Open Course
PDF
Best PHP Frameworks
PPTX
PHP framework difference
PPTX
Feature folders
PPTX
WebNetConf 2012 - Single Page Apps
PPTX
Version Control, Writers, and Workflows
PPT
PHP Framework
PDF
AppeX and JavaScript Support Enhancements in Cincom Smalltalk
About javascript libraries
Binding Objective-C Libraries in Xamarin.iOS
Oop principles
EPUB for Website Producers
Olympya web-tools 2011
Html5
Web Tools report
Introduction to portable class libraries
NOLOH PHP Framework - Unified Server-Side Development
Upgrading to Drupal 8: Benefits and Gotchas
Web Development with Delphi and React - ITDevCon 2016
Drupal 8 introduction
1st Chinaonrails Open Course
Best PHP Frameworks
PHP framework difference
Feature folders
WebNetConf 2012 - Single Page Apps
Version Control, Writers, and Workflows
PHP Framework
AppeX and JavaScript Support Enhancements in Cincom Smalltalk
Ad

Viewers also liked (14)

PPTX
Informática
PDF
wir haben die monstars - ingifts
PDF
In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...
PPTX
Deportes
DOCX
Formato de reporte de practica
DOCX
Biotecnologia
PPTX
Bollywood Hollywood
PDF
Spring 2015 Update Packet
PDF
Guía transporte acuático
DOCX
Kas dan Rekening Giro & Investasi Jangka pendek
PPTX
Herramientas de complejidad para el futuro sostenible de la vida en el desierto
PPTX
PDF
Advanced Cojure Microservices
PPT
India - Globalisation
Informática
wir haben die monstars - ingifts
In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...
Deportes
Formato de reporte de practica
Biotecnologia
Bollywood Hollywood
Spring 2015 Update Packet
Guía transporte acuático
Kas dan Rekening Giro & Investasi Jangka pendek
Herramientas de complejidad para el futuro sostenible de la vida en el desierto
Advanced Cojure Microservices
India - Globalisation
Ad

Similar to DrupalCamp Ghent 2014 - Developing Drupal 7 with Drupal 8 in mind (20)

PPTX
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
PDF
Drupal 8 deeper dive
PDF
How Not to Be Conned by Your Drupal Vendor!
PPT
Bootstrap + Drupal Commerce in less than 45 minutes!
PPTX
Gradle.Enemy at the gates
PDF
Devconf 2011 - PHP - How Yii framework is developed
PDF
Drupal upgrades and migrations. BAD Camp 2013 version
PPTX
Gradle 2.breaking stereotypes.
PPTX
Agile sites2
PDF
Using Grunt with Drupal
PPTX
Developing Complex WordPress Sites without Fear of Failure (with MVC)
PDF
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
PDF
Dipping Your Toe into Drupal 8 Module Development
ZIP
Staging and Deployment
ZIP
Using Features
PDF
Drupal Webinar: Ignite and Accelerate Your Drupal 7 to Drupal 9 Migration
PDF
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
PDF
Your first d8 module
PDF
How to guarantee your change is integrated to Moodle core
PPTX
Untying the Knots of Web Dev with Internet Explorer
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Drupal 8 deeper dive
How Not to Be Conned by Your Drupal Vendor!
Bootstrap + Drupal Commerce in less than 45 minutes!
Gradle.Enemy at the gates
Devconf 2011 - PHP - How Yii framework is developed
Drupal upgrades and migrations. BAD Camp 2013 version
Gradle 2.breaking stereotypes.
Agile sites2
Using Grunt with Drupal
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Dipping Your Toe into Drupal 8 Module Development
Staging and Deployment
Using Features
Drupal Webinar: Ignite and Accelerate Your Drupal 7 to Drupal 9 Migration
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
Your first d8 module
How to guarantee your change is integrated to Moodle core
Untying the Knots of Web Dev with Internet Explorer

Recently uploaded (20)

PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
System and Network Administraation Chapter 3
PDF
Understanding Forklifts - TECH EHS Solution
PDF
AI in Product Development-omnex systems
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
medical staffing services at VALiNTRY
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Nekopoi APK 2025 free lastest update
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
Reimagine Home Health with the Power of Agentic AI​
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
System and Network Administraation Chapter 3
Understanding Forklifts - TECH EHS Solution
AI in Product Development-omnex systems
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Which alternative to Crystal Reports is best for small or large businesses.pdf
medical staffing services at VALiNTRY
Upgrade and Innovation Strategies for SAP ERP Customers
wealthsignaloriginal-com-DS-text-... (1).pdf
Nekopoi APK 2025 free lastest update
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Softaken Excel to vCard Converter Software.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Navsoft: AI-Powered Business Solutions & Custom Software Development

DrupalCamp Ghent 2014 - Developing Drupal 7 with Drupal 8 in mind

  • 1. Develop a Drupal 7 project with Drupal 8 in mind Joeri van Dooren
  • 2. WHOAMI Who Am I Joeri van Dooren Technical Coach @ SAGA Consulting Group @Ozmodiar https://www.drupal.org/u/ozmodiar
  • 4. Context • Long life span • A lot of custom code • A lot of developers • Drupal 8 vs Drupal 7
  • 5. Challenges • Migration of custom code to D8 • External libraries • “Big project syndrome”
  • 7. Setup The problems… • Unreadable • Unmaintainable • Not testable (enough) • Not upgradable Vanilla Drupal 7 Object Oriented Code
  • 8. Setup Vanilla Drupal 7 What have we done? • xautoload module • Drupal 8 class structure Object Oriented Code
  • 10. Setup The problems… • Always re-instantiating classes • Not very maintainable • Not the D8 way Vanilla Drupal 7 Object Oriented Code Dependency Injection
  • 11. Setup Vanilla Drupal 7 Object Oriented Code Dependency Injection What have we done?
  • 13. Setup This is better, but… • Still not very readable • Not flexible enough • More D8 style, but… • D8 has a better solution Vanilla Drupal 7 Object Oriented Code Dependency Injection Container
  • 14. Vanilla Drupal 7 Setup Object Oriented Code Dependency Injection Container What have we done? • Custom module • Symfony Container • D8 uses that too! • Copy paste library • xautoload module
  • 16. Setup This is way better but… • Bad library maintenance • D8 has a better solution! Vanilla Drupal 7 Object Oriented Code Dependency Injection Container Dependency Manager
  • 17. Vanilla Drupal 7 Setup Object Oriented Code Dependency Injection Container Dependency Manager What have we done? • Introduced Composer • Better library management • Libraries not in VCS • Drupal 8 uses that too!
  • 18. Composer • Package Manager • Packagist.org or other VCS • composer.json • Vendor folder • Autoloading
  • 20. Setup Vanilla Drupal 7 Object Oriented Code Dependency Injection Container Dependency Manager
  • 21. Achievements • Easy external libraries • More Drupal 8 compliant • Object Oriented • Module structure • DI with Symfony Container • Less steep learning curve for D8 module dev
  • 22. Extra advantages • Readability • Maintainability • Extensibility • Easy debugging • Better testing • We got off the island (in D7!)
  • 23. Points of attention • Developers need a new mindset • Work around D7 limitations • Different code reviews
  • 24. The next level • Run your own Packagist (or Satis) • Write your own interfaces to improve code reviews • Write modules as libraries with a Drupal module as adapter
  • 25. More info Getting started http://www.saga.be/dic Extras http://youtu.be/GF0EWdsPfZ4 (dependency Injection) https://getcomposer.org http://symfony.com/doc/current/book/service_container.html
  • 26. Want to know more? Visit SAGA at our booth
  • 27. Want to know more? Tomorrow, because now:

Editor's Notes

  • #3: - Inactivity…
  • #4: 5 business units IT projects -> custom projects in Drupal for tourist organisations Online Communication -> websites in Drupal (and other technologies)
  • #5: Big project More than a year ago
  • #7: -
  • #9: Maintainability: Classname veranderen = overal aanpassen door heel de code
  • #11: Maintainability: Classname veranderen = overal aanpassen door heel de code
  • #15: - Put very simple: Box full of references to classes that contain business logic, refered to as “services”.
  • #24: Todo overwegen nadelen voor voordelen