Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Design Patterns and PHP 8 in Drupal Core - From Procedural to Object-Oriented Programming

Drupal Association via YouTube

Overview

Explore design patterns and PHP 8 features in Drupal Core through this 46-minute conference talk from the Drupal Association. Dive into the evolution of Drupal's architecture, from procedural programming to object-oriented design, and learn how it has embraced industry standards and collaboration with other frameworks. Gain insights into key concepts like Dependency Injection, Service Containers, Factory Methods, and PHP traits. Discover how Drupal 10's adoption of PHP 8.1 impacts development practices, including JIT compilation and stricter type checking. Through real-world examples and benchmarks, understand the performance improvements and code robustness achieved with PHP 8. Ideal for developers familiar with custom module and theme development, this talk provides a comprehensive understanding of standard programming patterns in Drupal core and the exciting new PHP 8 features implemented within it.

Syllabus

Intro
Procedural programming
Extended using hooks
Challenges with Drupal 7
Object oriented programming
Scenario - Car Manufacturing
Dependency Injection - Scenario
Dependency Injection - implementation
Real world is complicated!
Dependency Injection - Drupal
Enter Electric Batteries!
Electric Battery (engine?)
Adapter pattern - Drupal
Observer Pattern - Drupal
Design Patterns - benefits
Named Arguments
Deprecated Dynamic Properties
[In Discussion] Using Weakmap for container serialization solution
Attributes in place of Annotations
Use appropriate type hints wherever possible
What does this mean for the community?

Taught by

Drupal Association

Reviews

Start your review of Design Patterns and PHP 8 in Drupal Core - From Procedural to Object-Oriented Programming

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.