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

What's hot

About javascript libraries
About javascript librariesAbout javascript libraries
About javascript libraries
Harshal Patil
 
Binding Objective-C Libraries in Xamarin.iOS
Binding Objective-C Libraries in Xamarin.iOSBinding Objective-C Libraries in Xamarin.iOS
Binding Objective-C Libraries in Xamarin.iOS
Pierce Boggan
 
EPUB for Website Producers
EPUB for Website ProducersEPUB for Website Producers
EPUB for Website Producers
waldoj
 
Olympya web-tools 2011
Olympya web-tools 2011Olympya web-tools 2011
Olympya web-tools 2011
Paulo Mattos
 
Html5
Html5Html5
Html5
Nasla C.K
 
Web Tools report
Web Tools reportWeb Tools report
Web Tools report
IWMW
 
Introduction to portable class libraries
Introduction to portable class librariesIntroduction to portable class libraries
Introduction to portable class libraries
Michael John Peña
 
NOLOH PHP Framework - Unified Server-Side Development
NOLOH PHP Framework - Unified Server-Side DevelopmentNOLOH PHP Framework - Unified Server-Side Development
NOLOH PHP Framework - Unified Server-Side Development
NOLOH LLC.
 
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
Suzanne Dergacheva
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
Marco Breveglieri
 
Drupal 8 introduction
Drupal 8 introductionDrupal 8 introduction
Drupal 8 introduction
Aditya Ghan
 
1st Chinaonrails Open Course
1st Chinaonrails Open Course1st Chinaonrails Open Course
1st Chinaonrails Open CourseJesse Cai
 
Best PHP Frameworks
Best PHP FrameworksBest PHP Frameworks
Best PHP Frameworks
Clixlogix Technologies
 
PHP framework difference
PHP framework differencePHP framework difference
PHP framework difference
iScripts
 
Feature folders
Feature foldersFeature folders
Feature folders
Anthony_Steele_
 
WebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsWebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsPop Apps
 
Version Control, Writers, and Workflows
Version Control, Writers, and WorkflowsVersion Control, Writers, and Workflows
Version Control, Writers, and Workflows
stc-siliconvalley
 
PHP Framework
PHP FrameworkPHP Framework
PHP Framework
celeroo
 
AppeX and JavaScript Support Enhancements in Cincom Smalltalk
AppeX and JavaScript Support Enhancements in Cincom SmalltalkAppeX and JavaScript Support Enhancements in Cincom Smalltalk
AppeX and JavaScript Support Enhancements in Cincom Smalltalk
ESUG
 

What's hot (20)

About javascript libraries
About javascript librariesAbout javascript libraries
About javascript libraries
 
Binding Objective-C Libraries in Xamarin.iOS
Binding Objective-C Libraries in Xamarin.iOSBinding Objective-C Libraries in Xamarin.iOS
Binding Objective-C Libraries in Xamarin.iOS
 
Oop principles
Oop principlesOop principles
Oop principles
 
EPUB for Website Producers
EPUB for Website ProducersEPUB for Website Producers
EPUB for Website Producers
 
Olympya web-tools 2011
Olympya web-tools 2011Olympya web-tools 2011
Olympya web-tools 2011
 
Html5
Html5Html5
Html5
 
Web Tools report
Web Tools reportWeb Tools report
Web Tools report
 
Introduction to portable class libraries
Introduction to portable class librariesIntroduction to portable class libraries
Introduction to portable class libraries
 
NOLOH PHP Framework - Unified Server-Side Development
NOLOH PHP Framework - Unified Server-Side DevelopmentNOLOH PHP Framework - Unified Server-Side Development
NOLOH PHP Framework - Unified Server-Side Development
 
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
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
 
Drupal 8 introduction
Drupal 8 introductionDrupal 8 introduction
Drupal 8 introduction
 
1st Chinaonrails Open Course
1st Chinaonrails Open Course1st Chinaonrails Open Course
1st Chinaonrails Open Course
 
Best PHP Frameworks
Best PHP FrameworksBest PHP Frameworks
Best PHP Frameworks
 
PHP framework difference
PHP framework differencePHP framework difference
PHP framework difference
 
Feature folders
Feature foldersFeature folders
Feature folders
 
WebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsWebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page Apps
 
Version Control, Writers, and Workflows
Version Control, Writers, and WorkflowsVersion Control, Writers, and Workflows
Version Control, Writers, and Workflows
 
PHP Framework
PHP FrameworkPHP Framework
PHP Framework
 
AppeX and JavaScript Support Enhancements in Cincom Smalltalk
AppeX and JavaScript Support Enhancements in Cincom SmalltalkAppeX and JavaScript Support Enhancements in Cincom Smalltalk
AppeX and JavaScript Support Enhancements in Cincom Smalltalk
 

Viewers also liked

wir haben die monstars - ingifts
wir haben die monstars - ingiftswir haben die monstars - ingifts
wir haben die monstars - ingifts
robinharrisofi
 
In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...
In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...
In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...Abigail Coleman
 
Deportes
DeportesDeportes
Deportes
ivocicc
 
Formato de reporte de practica
Formato de reporte de practicaFormato de reporte de practica
Formato de reporte de practicaflotardk10
 
Biotecnologia
BiotecnologiaBiotecnologia
Biotecnologia
ivocicc
 
Bollywood Hollywood
Bollywood HollywoodBollywood Hollywood
Bollywood Hollywood
Purab Gandhi
 
Guía transporte acuático
Guía transporte acuáticoGuía transporte acuático
Guía transporte acuático
Leydy Sanchez
 
Kas dan Rekening Giro & Investasi Jangka pendek
Kas dan Rekening Giro & Investasi Jangka pendekKas dan Rekening Giro & Investasi Jangka pendek
Kas dan Rekening Giro & Investasi Jangka pendekNickthereal
 
Herramientas de complejidad para el futuro sostenible de la vida en el desierto
Herramientas de complejidad para el futuro sostenible de la vida en el desiertoHerramientas de complejidad para el futuro sostenible de la vida en el desierto
Herramientas de complejidad para el futuro sostenible de la vida en el desierto
Universidad de Buenos Aires
 
Html5
Html5Html5
Advanced Cojure Microservices
Advanced Cojure MicroservicesAdvanced Cojure Microservices
Advanced Cojure Microservices
inovex GmbH
 
India - Globalisation
India - GlobalisationIndia - Globalisation
India - Globalisation
captaink99
 

Viewers also liked (14)

Informática
InformáticaInformática
Informática
 
wir haben die monstars - ingifts
wir haben die monstars - ingiftswir haben die monstars - ingifts
wir haben die monstars - ingifts
 
In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...
In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...
In-vitro-anti-cholinesterase-activities-by-piperine-an-alkaloid-from-the-spic...
 
Deportes
DeportesDeportes
Deportes
 
Formato de reporte de practica
Formato de reporte de practicaFormato de reporte de practica
Formato de reporte de practica
 
Biotecnologia
BiotecnologiaBiotecnologia
Biotecnologia
 
Bollywood Hollywood
Bollywood HollywoodBollywood Hollywood
Bollywood Hollywood
 
Spring 2015 Update Packet
Spring 2015 Update PacketSpring 2015 Update Packet
Spring 2015 Update Packet
 
Guía transporte acuático
Guía transporte acuáticoGuía transporte acuático
Guía transporte acuático
 
Kas dan Rekening Giro & Investasi Jangka pendek
Kas dan Rekening Giro & Investasi Jangka pendekKas dan Rekening Giro & Investasi Jangka pendek
Kas dan Rekening Giro & Investasi Jangka pendek
 
Herramientas de complejidad para el futuro sostenible de la vida en el desierto
Herramientas de complejidad para el futuro sostenible de la vida en el desiertoHerramientas de complejidad para el futuro sostenible de la vida en el desierto
Herramientas de complejidad para el futuro sostenible de la vida en el desierto
 
Html5
Html5Html5
Html5
 
Advanced Cojure Microservices
Advanced Cojure MicroservicesAdvanced Cojure Microservices
Advanced Cojure Microservices
 
India - Globalisation
India - GlobalisationIndia - Globalisation
India - Globalisation
 

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

Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Steve Kessler
 
Drupal 8 deeper dive
Drupal 8 deeper diveDrupal 8 deeper dive
Drupal 8 deeper dive
Amazee Labs
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!
pixelonion
 
Bootstrap + Drupal Commerce in less than 45 minutes!
Bootstrap + Drupal Commerce in less than 45 minutes!Bootstrap + Drupal Commerce in less than 45 minutes!
Bootstrap + Drupal Commerce in less than 45 minutes!
Jorge Diaz
 
Gradle.Enemy at the gates
Gradle.Enemy at the gatesGradle.Enemy at the gates
Gradle.Enemy at the gates
Strannik_2013
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
Alexander Makarov
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
David Lanier
 
Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.
Stfalcon Meetups
 
Agile sites2
Agile sites2Agile sites2
Agile sites2
Michele Sciabarrà
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupal
arithmetric
 
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
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
Dipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module DevelopmentDipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module Development
Suzanne Dergacheva
 
Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deployment
heyrocker
 
Using Features
Using FeaturesUsing Features
Using Features
Alexandru Badiu
 
Drupal Webinar: Ignite and Accelerate Your Drupal 7 to Drupal 9 Migration
Drupal Webinar: Ignite and Accelerate Your Drupal 7 to Drupal 9 MigrationDrupal Webinar: Ignite and Accelerate Your Drupal 7 to Drupal 9 Migration
Drupal Webinar: Ignite and Accelerate Your Drupal 7 to Drupal 9 Migration
Cyber-Duck
 
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
Eric Sembrat
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
tedbow
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreDan Poltawski
 
Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer
Sarah Dutkiewicz
 

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

Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
Resources for Navigating Drupal Upgrades: Versions 6 Through 8 And What It Me...
 
Drupal 8 deeper dive
Drupal 8 deeper diveDrupal 8 deeper dive
Drupal 8 deeper dive
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!
 
Bootstrap + Drupal Commerce in less than 45 minutes!
Bootstrap + Drupal Commerce in less than 45 minutes!Bootstrap + Drupal Commerce in less than 45 minutes!
Bootstrap + Drupal Commerce in less than 45 minutes!
 
Gradle.Enemy at the gates
Gradle.Enemy at the gatesGradle.Enemy at the gates
Gradle.Enemy at the gates
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
 
Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.
 
Agile sites2
Agile sites2Agile sites2
Agile sites2
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupal
 
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)
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 
Dipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module DevelopmentDipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module Development
 
Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deployment
 
Using Features
Using FeaturesUsing Features
Using Features
 
Drupal Webinar: Ignite and Accelerate Your Drupal 7 to Drupal 9 Migration
Drupal Webinar: Ignite and Accelerate Your Drupal 7 to Drupal 9 MigrationDrupal Webinar: Ignite and Accelerate Your Drupal 7 to Drupal 9 Migration
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...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle core
 
Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer
 

Recently uploaded

Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 

Recently uploaded (20)

Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 

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

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