DrupalCon Austin BuildAModule Training "Drupal For Beginners" Introduction Slides
DrupalCon Developer Summit 2010 lightning slides: Encourage usage of PHP Interfaces In Drupal
-
Upload
chris-charlton -
Category
Technology
-
view
1.305 -
download
1
description
Transcript of DrupalCon Developer Summit 2010 lightning slides: Encourage usage of PHP Interfaces In Drupal
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?