Drupal Camp Chattanooga 2018
Parent Track: 
Development & Performance

Object oriented programming (OOP) is a system design philosophy that aims to treat aspects of the system as "things" that consist of attributes and behaviors. This concept may be easier to understand if you consider how objects in the real world work, such as a dog. A dog has attributes such as breed, hair color, and weight, while it also has behaviors such as barking, running, and sleeping.

This session will provide understanding for the fundamental object oriented programming concepts, as they apply to PHP, while attempting to explain the value of the art. We will look at and attempt to demystify the following concepts:

  • Class - A template for objects that define the data (attributes) and/or operations (behaviors) the objects may use.
  • Object - A single instance of class.
  • Abstraction - The process of picking out common features of a system in order to provide greater reusability of those features.
  • Encapsulation - Wrapping related elements (data and/or procedures) of a system together to create a new abstraction,
  • Inheritance - A feature of OOP that allows the creation of different sub-types of a class. In other words, the ability for a class to inherit the features of another class.
  • Interfaces - The ability to provide strict specifications for a class to create predictability and thus reiability within a system.

Bonus: Programming to Interaces - A technique for creating systems that are both easily extendable and reliable in their extension.

Intended for developers who have no, or limited, experience with Drupal 8 or OOP.