drupalcon developer summit 2010 lightning slides: encourage usage of php interfaces in drupal
DESCRIPTION
My lightning slides for the Developer Summit taking place a couple days before the DrupalCon 2010 San Francisco event.TRANSCRIPT
Encourage more usage of PHP Interfaces in DrupalBetter Core. Better Modules. Better Drupal.
Chris Charlton - XTND.US - http://xtnd.us
PHP Interfaces implements
Maps out required functions a Class file implements.
Multiple Interfaces allowed per Class file.
Can be extended using the extends operator.
Prevents errors and misspellings of functions/hooks.
Smart IDE software use Interface files as blueprints.
PHP Interfaces usage example
<?php
/** * Query builder for SELECT statements. */class SelectQuery extends Query implements SelectQueryInterface { // ...}
Interfaces used in over 20 instances of Drupal 7 core
Queries & DB Engine
Queues
File transfers
class Drupal implements IDrupal
Attract OOP-based followers (PHP, Java, etc.).
Represents a level of code maturity (and complexity).
Next-gen Module / Theme Engine development?
Might be too soon for Drupal. D9? D10?