This site is archived.
Skip to Content

Objectifying PHP

Your session in a few words: 
Introduction to Object-Oriented development in PHP
Track: 
Code it, test it, deploy it
Session Type: 
Lecture
Level of expertise: 
Beginner
Language: 
English

After years of being a strictly-procedural framework, Drupal is starting to embrace object-oriented programming in a big way. Views is now mostly object-oriented. The Drupal 7 database layer is entirely object-oriented, with a thin procedural veneer. Unit testing is object-oriented. Various other efforts at media handling, plugins and handlers, and more are leveraging objects.

Of course, Drupal has attracted lots of developers who may not understand object-oriented coding, and how to do it well. This session will act as an introduction to the concepts behind objects, classes, interfaces, and other mainstays of PHP object-oriented development. It will start with the basics of the concept of object-oriented programming and cover the syntax, theory, and "how to not do it wrong".

If your eyes cross when seeing code like this:

$plugin->doSomething()->doSomethingElse($plugin);

then this session is for you.