Drupal - Why isn't Drupal object oriented?

This is pretty well explained on Drupal programming from an object-oriented perspective.

In short, Drupal has existed for much longer than you could properly use OOP in PHP. Which means, PHP5.

Drupal 7 already uses classes internally in a lot of places and it will probably continue so with Drupal 8.

But this is a step by step process and not everything needs to be a class. For example, it does not make any sense to make modules into a single class.


Drupal was created before oo became better in php5. Objects are being used more in drupal in each release but you need to balance a complete rewrite and adding new features.

Tags:

6