Intermediate OOP in Drupal: Patterns, Services, Events and Dependency Injection

Drupal Camp Asheville 2024 - July 12th-14th

Room
HeroDevs (229)
Start Time

Topics

Presenter(s)

Jonathan Daggerhart
of
Daggerhart Lab
Photo Of Jonathan Daggerhart

Long time Drupal and WordPress developer. A lead organizer of Drupal Camp Asheville.

Jonathan is an expert in PHP and JavaScript developer with significant experience with DevOps and system administration. He enjoys working closely with clients and development teams to determine, communicate, and produce the best possible solutions that improve process and meet business needs.

Intermedia OOP In Drupal Opening Slide

Drupal 8+ changes made it necessary for developers to have a stronger understanding of object oriented programming. In this training we'll discuss and demystify some of the most useful OOP concepts, patterns, and jargon as they apply to modern Drupal development.

This training will best serve developers who have some understanding of OOP, and want to learn more about the theory behind best practices seen in Drupal 8+ and Symfony. The approach of this training is a series of discussions paired with practical examples of how the topics apply to Drupal 8 module development. If things get really wild, we'll live-code some modules.

Topics include:

  • OOP Concepts: Nouns & Verbs, Composition over Inheritance, Dependency Injection, Programming to Interfaces, Cohesion and Coupling
  • Patterns: Dependency Injection Container vs Service Locator, Events (vs Hooks), Factory, Decorator
  • Drupal/Symfony: Services and Dependency Injection for Services, Forms, Blocks, Controllers

Attendees will leave this training with working understanding of many new concepts they can use to create better and more maintainable Drupal modules.

Prerequisites: 

Basic OOP knowledge (what classes are and syntax for using them), and maybe some Drupal module development.