[development] SoC - (general) object oriented coding
morbus at disobey.com
Thu May 4 20:27:04 UTC 2006
> Should any piece of Drupal code (especially the newly written codes)
> contain objects? Should I design new modules/etc in object oriented way?
> I use fgrep to browse in Drupal cvs code, but I can't find any class.
> Is it a non-written coding standard to not use oo? (by the way in PHP4
> the oo is not very mature)
Currently, Drupal core is all procedural, and for a reason. Please see:
Drupal Programming from an Object-Oriented Perspective
Which isn't to say that you *can't* use OOP (the awesome views.module
does so) if absolutely necessary, but I think it's fairly safe to say,
contribution-or-not, procedural is preferred.
Morbus Iff ( you see, doctor, but you do not observe! )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
More information about the development