SlideShare a Scribd company logo
1 of 6
Download to read offline
Website Audit
Drupal 7 migrating to
Drupal 8
2
For those who managed to get their way around Drupal 7, migrating to Drupal 8 might come
as a challenge. As a Drupal developer, you have tackled different issues and won, managing
to create complex modules from numerous PHP libraries, and solved complex business
logic. However, your procedural understanding will no longer suffice in the world of Drupal
8.
Two experts, Toby Hagler (Phase2 Director of Engineering) and Ryan Loss (Developer),
joined forces at DrupalCon Nashville to share insights on the novelties in Drupal 8, and tell
us what ‘Symfony’ is, what is its purpose, and how it is a part of Drupal 8. For a better
understanding, they have related everything to the Lovecraft mythos.
THE LOVECRAFT MYTHOS
One of the common themes in Lovecraft’s cosmic horror stories is the trope - blue and
orange morality. People tend to see everything in black and white (and some shades of grey),
with a two-dimensional value system of good and evil. But a cat; that is a cute and lovely
creature that loves to murder on a beautiful day, which means that it has a different value
grid that’s sometimes referred to as blue and orange morality. Drupal 8 and Symfony kind of
exist like that.
Drupal 8 is not hard – it’s different. Very straightforward at the surface, but complex and
different beneath the hood. Toby and Ryan have made their best to teach us about the back-
end concepts of Drupal 8.
INVESTIGATING: WHAT’S NEW IN DRUPAL?
There have been many changes in Drupal regarding controllers, routes, plugins, and services.
You’ve moved to Drupal 8 and find out that a lot of changes make it feel otherworldly.
Classes
User-defined, custom data types, such as strings, integers, arrays, floats, enums, hashes, etc.
Classes are made up of properties and methods, where properties are variables within the
class, while methods are a particular type of function contained solely within the scope of a
class. Classes can extend other classes (inheritance), implement interfaces, and implement
traits. They can take on the features of different classes and keep on stretching to infinity.
Objects
3
Object – a variable version of a class. A class is a data type, while an object is an instance of
a class (like a node).
THE INTRODUCTION TO SYMFONY FRAMEWORK
Symfony is a mature PHP framework that’s been around for years, but if you want to utilize
its powers, you must submit to its design patterns. Symfony is there to fight the chaos and
forge it into something more universal across frameworks and platforms.
Symfony grants exclusive access to an autoloader that can build up a code cache and load
only the services required. It can result in fewer resources allocated to Drupal, but we must
first understand the Symfony framework.
Namespaces – abstract containers hold the logical grouping of unique identifiers (names).
They limit the scope of your class to your module.
Annotations and conjurations – Annotations are there to help Drupal discover a particular
plugin while scanning your module directory.
ENTITIES
Entities in Drupal 8 are things such as users, nodes, and media items. For example, a Drupal
user is an object of the user class which extends the entity-based class. All content entities
can have fields which are useful for tagging, making media searchable, and other metadata.
Fields can be added easily through the Admin panel as well as exported as a configuration
that you want to add to a module.
PLUGINS IN DRUPAL 8
Drupal’s plugin system is a vital back-end concept. Plugins are a type of class that provides a
unit of functionality that is swappable and solves a single problem. Components of Drupal
core, such as forms, blocks, or fields, have been designed to be pluggable, which allows you
to reach in and change them if necessary. Plugins always have a plugin type, which is the
central controlling class that extends and defines how a plugin is discovered and instantiated.
Of course, you can still create your plugins if the right one is not available.
UNDERSTANDING ROUTES AND CONTROLLERS
The days of callback functions and hook menus are long gone, and URLs and paths to
content have all been replaced with the Symfony framework of routes. Routes act as a switch
4
box that routes any request. Routes and controllers are particular types of classes that handle
the response to the request.
SERVICES, DEPENDENCY INJECTION, AND EVENTS
In Drupal 8, Symfony introduces service-oriented architecture. Imagine a warren of tiny
creatures, running around with their tasks and doing something for a master entity
(sometimes working together to achieve something.) It’s how you can visualize this kind of
architecture.
Service – a class that’s intended to do a particular task.
Dependency injection – Arguments passed to a service in a module. You can inject
whatever dependencies you want into it directly
Service container – When Drupal’s autoloader discovers all of the service classes, it puts
them into a service container. It’s an index of all the services that Drupal knows.
Service types – Just like plugins have plugin types; services have types (like events.) Events
are a regular service, but they’re not something that you call like one. It gets called
automatically at one point of code execution.
HELPFUL TOOLS FOR DEALING WITH DRUPAL 8 BACK-END
When developing Drupal’s back-end, these are the things that were found incredibly useful,
and the presenters wanted to talk about:
• SQL Pro (run queries directly, full UI for your database)
• CLIs (run basic and repetitive tasks quickly, skip the UI)
• Xdebug (pause and analyze function mid-execution, run methods on properties, stack
tracing)
• Devel (merging the UI and back-end; has Kint, Web Profiler, and generate dummy
content)
• Drupal itself (useful for understanding, learning, and implementing Drupal)
Want to learn more about Drupal 8? Do you need a developer that can help you prepare and
migrate your site to the latest version of Drupal? Contact us today
5
6

More Related Content

Similar to Drupal 7 migrating to drupal 8

Drupal Experience Sharing At Prime College
Drupal Experience Sharing At Prime CollegeDrupal Experience Sharing At Prime College
Drupal Experience Sharing At Prime CollegeGeshan Manandhar
 
Future Scope of Drupal as a Technology in 2020 and Beyond
Future Scope of Drupal as a Technology in 2020 and BeyondFuture Scope of Drupal as a Technology in 2020 and Beyond
Future Scope of Drupal as a Technology in 2020 and BeyondKaty Slemon
 
Drupal 8 Vocabulary Lesson
Drupal 8 Vocabulary LessonDrupal 8 Vocabulary Lesson
Drupal 8 Vocabulary LessonMediacurrent
 
LITA Preconference: Getting Started with Drupal (handout)
LITA Preconference: Getting Started with Drupal (handout)LITA Preconference: Getting Started with Drupal (handout)
LITA Preconference: Getting Started with Drupal (handout)Rachel Vacek
 
M.c.a. (sem iv)- java programming
M.c.a. (sem   iv)- java programmingM.c.a. (sem   iv)- java programming
M.c.a. (sem iv)- java programmingPraveen Chowdary
 
Drupal(2)
Drupal(2)Drupal(2)
Drupal(2)tomcoh
 
EdTechJoker Spring 2020 - Lecture 7 Drupal intro
EdTechJoker Spring 2020 - Lecture 7 Drupal introEdTechJoker Spring 2020 - Lecture 7 Drupal intro
EdTechJoker Spring 2020 - Lecture 7 Drupal introBryan Ollendyke
 
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
 
PHPNW Drupal as a Framework
PHPNW Drupal as a FrameworkPHPNW Drupal as a Framework
PHPNW Drupal as a Frameworkdigital006
 
Automating Drupal Development with Patterns: introducing 7.x-2.x
Automating Drupal Development with Patterns: introducing 7.x-2.xAutomating Drupal Development with Patterns: introducing 7.x-2.x
Automating Drupal Development with Patterns: introducing 7.x-2.xDavid Rozas
 
From Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
From Drupal 7 to Drupal 8 - Drupal Intensive Course OverviewFrom Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
From Drupal 7 to Drupal 8 - Drupal Intensive Course OverviewItalo Mairo
 
Getting Started with Drupal - Handouts
Getting Started with Drupal - HandoutsGetting Started with Drupal - Handouts
Getting Started with Drupal - HandoutsRachel Vacek
 

Similar to Drupal 7 migrating to drupal 8 (20)

Drupal Experience Sharing At Prime College
Drupal Experience Sharing At Prime CollegeDrupal Experience Sharing At Prime College
Drupal Experience Sharing At Prime College
 
Future Scope of Drupal as a Technology in 2020 and Beyond
Future Scope of Drupal as a Technology in 2020 and BeyondFuture Scope of Drupal as a Technology in 2020 and Beyond
Future Scope of Drupal as a Technology in 2020 and Beyond
 
Drupal an introduction
Drupal an introductionDrupal an introduction
Drupal an introduction
 
Drupal 8 Vocabulary Lesson
Drupal 8 Vocabulary LessonDrupal 8 Vocabulary Lesson
Drupal 8 Vocabulary Lesson
 
Decoupled drupal
Decoupled drupal Decoupled drupal
Decoupled drupal
 
Introducing drupal
Introducing  drupalIntroducing  drupal
Introducing drupal
 
LITA Preconference: Getting Started with Drupal (handout)
LITA Preconference: Getting Started with Drupal (handout)LITA Preconference: Getting Started with Drupal (handout)
LITA Preconference: Getting Started with Drupal (handout)
 
M.c.a. (sem iv)- java programming
M.c.a. (sem   iv)- java programmingM.c.a. (sem   iv)- java programming
M.c.a. (sem iv)- java programming
 
Drupal Webinar
Drupal WebinarDrupal Webinar
Drupal Webinar
 
Drupal(2)
Drupal(2)Drupal(2)
Drupal(2)
 
EdTechJoker Spring 2020 - Lecture 7 Drupal intro
EdTechJoker Spring 2020 - Lecture 7 Drupal introEdTechJoker Spring 2020 - Lecture 7 Drupal intro
EdTechJoker Spring 2020 - Lecture 7 Drupal intro
 
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...
 
PHPNW Drupal as a Framework
PHPNW Drupal as a FrameworkPHPNW Drupal as a Framework
PHPNW Drupal as a Framework
 
Drupal
DrupalDrupal
Drupal
 
Automating Drupal Development with Patterns: introducing 7.x-2.x
Automating Drupal Development with Patterns: introducing 7.x-2.xAutomating Drupal Development with Patterns: introducing 7.x-2.x
Automating Drupal Development with Patterns: introducing 7.x-2.x
 
Drupal for Programmers
Drupal for ProgrammersDrupal for Programmers
Drupal for Programmers
 
Drupal in-depth
Drupal in-depthDrupal in-depth
Drupal in-depth
 
From Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
From Drupal 7 to Drupal 8 - Drupal Intensive Course OverviewFrom Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
From Drupal 7 to Drupal 8 - Drupal Intensive Course Overview
 
Drupal refcard
Drupal refcardDrupal refcard
Drupal refcard
 
Getting Started with Drupal - Handouts
Getting Started with Drupal - HandoutsGetting Started with Drupal - Handouts
Getting Started with Drupal - Handouts
 

More from DrupalGeeks

Website optimization strategies
Website optimization strategiesWebsite optimization strategies
Website optimization strategiesDrupalGeeks
 
Choose your right cms
Choose your right cmsChoose your right cms
Choose your right cmsDrupalGeeks
 
Essentials of a digital experience platform
Essentials of a digital experience platform Essentials of a digital experience platform
Essentials of a digital experience platform DrupalGeeks
 
Steps to port your module in drupal.org when you have the d8 code ready
Steps to port your module in drupal.org when you have the d8 code readySteps to port your module in drupal.org when you have the d8 code ready
Steps to port your module in drupal.org when you have the d8 code readyDrupalGeeks
 
Tools to Upgrade to Drupal 8
Tools to Upgrade to Drupal 8Tools to Upgrade to Drupal 8
Tools to Upgrade to Drupal 8DrupalGeeks
 
Drupal 6-long-term-support
Drupal 6-long-term-supportDrupal 6-long-term-support
Drupal 6-long-term-supportDrupalGeeks
 
How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?DrupalGeeks
 
Drupal6 support end on feb 24
Drupal6 support end on feb 24Drupal6 support end on feb 24
Drupal6 support end on feb 24DrupalGeeks
 
How drupal cloned star wars?
How drupal cloned star wars?How drupal cloned star wars?
How drupal cloned star wars?DrupalGeeks
 
Acquia flush varnish
Acquia flush varnishAcquia flush varnish
Acquia flush varnishDrupalGeeks
 
How to Build Responsive Bootstrap Themes Using Drupal
How to Build Responsive Bootstrap Themes Using DrupalHow to Build Responsive Bootstrap Themes Using Drupal
How to Build Responsive Bootstrap Themes Using DrupalDrupalGeeks
 
What’s New on Drupal 8 for End Users & Clients
What’s New on Drupal 8 for End Users & ClientsWhat’s New on Drupal 8 for End Users & Clients
What’s New on Drupal 8 for End Users & ClientsDrupalGeeks
 

More from DrupalGeeks (12)

Website optimization strategies
Website optimization strategiesWebsite optimization strategies
Website optimization strategies
 
Choose your right cms
Choose your right cmsChoose your right cms
Choose your right cms
 
Essentials of a digital experience platform
Essentials of a digital experience platform Essentials of a digital experience platform
Essentials of a digital experience platform
 
Steps to port your module in drupal.org when you have the d8 code ready
Steps to port your module in drupal.org when you have the d8 code readySteps to port your module in drupal.org when you have the d8 code ready
Steps to port your module in drupal.org when you have the d8 code ready
 
Tools to Upgrade to Drupal 8
Tools to Upgrade to Drupal 8Tools to Upgrade to Drupal 8
Tools to Upgrade to Drupal 8
 
Drupal 6-long-term-support
Drupal 6-long-term-supportDrupal 6-long-term-support
Drupal 6-long-term-support
 
How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?
 
Drupal6 support end on feb 24
Drupal6 support end on feb 24Drupal6 support end on feb 24
Drupal6 support end on feb 24
 
How drupal cloned star wars?
How drupal cloned star wars?How drupal cloned star wars?
How drupal cloned star wars?
 
Acquia flush varnish
Acquia flush varnishAcquia flush varnish
Acquia flush varnish
 
How to Build Responsive Bootstrap Themes Using Drupal
How to Build Responsive Bootstrap Themes Using DrupalHow to Build Responsive Bootstrap Themes Using Drupal
How to Build Responsive Bootstrap Themes Using Drupal
 
What’s New on Drupal 8 for End Users & Clients
What’s New on Drupal 8 for End Users & ClientsWhat’s New on Drupal 8 for End Users & Clients
What’s New on Drupal 8 for End Users & Clients
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Drupal 7 migrating to drupal 8

  • 1. Website Audit Drupal 7 migrating to Drupal 8
  • 2. 2 For those who managed to get their way around Drupal 7, migrating to Drupal 8 might come as a challenge. As a Drupal developer, you have tackled different issues and won, managing to create complex modules from numerous PHP libraries, and solved complex business logic. However, your procedural understanding will no longer suffice in the world of Drupal 8. Two experts, Toby Hagler (Phase2 Director of Engineering) and Ryan Loss (Developer), joined forces at DrupalCon Nashville to share insights on the novelties in Drupal 8, and tell us what ‘Symfony’ is, what is its purpose, and how it is a part of Drupal 8. For a better understanding, they have related everything to the Lovecraft mythos. THE LOVECRAFT MYTHOS One of the common themes in Lovecraft’s cosmic horror stories is the trope - blue and orange morality. People tend to see everything in black and white (and some shades of grey), with a two-dimensional value system of good and evil. But a cat; that is a cute and lovely creature that loves to murder on a beautiful day, which means that it has a different value grid that’s sometimes referred to as blue and orange morality. Drupal 8 and Symfony kind of exist like that. Drupal 8 is not hard – it’s different. Very straightforward at the surface, but complex and different beneath the hood. Toby and Ryan have made their best to teach us about the back- end concepts of Drupal 8. INVESTIGATING: WHAT’S NEW IN DRUPAL? There have been many changes in Drupal regarding controllers, routes, plugins, and services. You’ve moved to Drupal 8 and find out that a lot of changes make it feel otherworldly. Classes User-defined, custom data types, such as strings, integers, arrays, floats, enums, hashes, etc. Classes are made up of properties and methods, where properties are variables within the class, while methods are a particular type of function contained solely within the scope of a class. Classes can extend other classes (inheritance), implement interfaces, and implement traits. They can take on the features of different classes and keep on stretching to infinity. Objects
  • 3. 3 Object – a variable version of a class. A class is a data type, while an object is an instance of a class (like a node). THE INTRODUCTION TO SYMFONY FRAMEWORK Symfony is a mature PHP framework that’s been around for years, but if you want to utilize its powers, you must submit to its design patterns. Symfony is there to fight the chaos and forge it into something more universal across frameworks and platforms. Symfony grants exclusive access to an autoloader that can build up a code cache and load only the services required. It can result in fewer resources allocated to Drupal, but we must first understand the Symfony framework. Namespaces – abstract containers hold the logical grouping of unique identifiers (names). They limit the scope of your class to your module. Annotations and conjurations – Annotations are there to help Drupal discover a particular plugin while scanning your module directory. ENTITIES Entities in Drupal 8 are things such as users, nodes, and media items. For example, a Drupal user is an object of the user class which extends the entity-based class. All content entities can have fields which are useful for tagging, making media searchable, and other metadata. Fields can be added easily through the Admin panel as well as exported as a configuration that you want to add to a module. PLUGINS IN DRUPAL 8 Drupal’s plugin system is a vital back-end concept. Plugins are a type of class that provides a unit of functionality that is swappable and solves a single problem. Components of Drupal core, such as forms, blocks, or fields, have been designed to be pluggable, which allows you to reach in and change them if necessary. Plugins always have a plugin type, which is the central controlling class that extends and defines how a plugin is discovered and instantiated. Of course, you can still create your plugins if the right one is not available. UNDERSTANDING ROUTES AND CONTROLLERS The days of callback functions and hook menus are long gone, and URLs and paths to content have all been replaced with the Symfony framework of routes. Routes act as a switch
  • 4. 4 box that routes any request. Routes and controllers are particular types of classes that handle the response to the request. SERVICES, DEPENDENCY INJECTION, AND EVENTS In Drupal 8, Symfony introduces service-oriented architecture. Imagine a warren of tiny creatures, running around with their tasks and doing something for a master entity (sometimes working together to achieve something.) It’s how you can visualize this kind of architecture. Service – a class that’s intended to do a particular task. Dependency injection – Arguments passed to a service in a module. You can inject whatever dependencies you want into it directly Service container – When Drupal’s autoloader discovers all of the service classes, it puts them into a service container. It’s an index of all the services that Drupal knows. Service types – Just like plugins have plugin types; services have types (like events.) Events are a regular service, but they’re not something that you call like one. It gets called automatically at one point of code execution. HELPFUL TOOLS FOR DEALING WITH DRUPAL 8 BACK-END When developing Drupal’s back-end, these are the things that were found incredibly useful, and the presenters wanted to talk about: • SQL Pro (run queries directly, full UI for your database) • CLIs (run basic and repetitive tasks quickly, skip the UI) • Xdebug (pause and analyze function mid-execution, run methods on properties, stack tracing) • Devel (merging the UI and back-end; has Kint, Web Profiler, and generate dummy content) • Drupal itself (useful for understanding, learning, and implementing Drupal) Want to learn more about Drupal 8? Do you need a developer that can help you prepare and migrate your site to the latest version of Drupal? Contact us today
  • 5. 5
  • 6. 6