Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
DrupalCon Developer Summit 2010 lightning slides: Encourage usage of PHP Interfaces In Drupal
1. Encourage more usage of
PHP Interfaces in Drupal
Better Core. Better Modules. Better Drupal.
Chris Charlton - XTND.US - http://xtnd.us
2. 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.
3. PHP Interfaces usage example
<?php
/**
* Query builder for SELECT statements.
*/
class SelectQuery extends Query implements SelectQueryInterface {
// ...
}
4. Interfaces used in over 20
instances of Drupal 7 core
Queries & DB Engine
Queues
File transfers
5. 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?