The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

The dangers of OOP

Submitted by nk on Sun, 2007-12-30 08:17

"Effective use of OO tools requires traversing a long learning curve." -- Mitch Kramer in an article from 1993.

"Object-oriented programming (OOP) is becoming the norm within software development, but is associated with a steeper learning curve than the conventional structured approach." http://www.actapress.com/PaperInfo.aspx?PaperID=27552

"Really "getting" object-oriented programming will take a bit longer" http://lists.apple.com/archives/Student-dev/2004/Oct/msg00053.html

"However, given OO's significant learning curve..." I can only link to the abstract.

Of course, the first article actually touts the benefits of OOP. This article says "anyone who's come from a procedural background to object-oriented programming has gone through this learning curve, and it's well worth it [...] OOP concepts, when applied correctly, do in fact live up to their promise". Let's say this again (and I will repeat until the oceans dry up): if we go too much OOP then we close out casual coders from using Drupal. I believe PHP is successful because code is easy to grok. While Drupal does have its own amount of magic, a complex OOP framework operates on so much magic that people just gets lost. Also while FAPI needed three releases to get it "right", if we go OOP, we need to release something that is done right. At my workplace, my colleague asked how to make a multistep CCK form in Drupal 5 and I said you can't do that, and Eaton agreed on it (solution, create custom form and do a node_save at the end). This is much easier in Drupal 6 but for eg. handling required fields need some magic. What will be the "don't do that" in the Drupal that we release with just too much OOP? Remember to not fix what's not broken.

Commenting on this Story is closed.

Submitted by Benjamin Birkenhake on Sun, 2007-12-30 10:53.

I didn't realize, that there is a discussion to get more OO in Drupal, is there? Anyway: in my last company, we developed a CMS based on OOPHP5. And sure it was a little more to learn for each programmer. But:

1. It was really worth it. It saved us time, problems and was really more clean.
2. I think Drupals Hooks'n'Array System isn't much easier to understand, if you are a "casual coder". It's a kind of programming paradigm by itself.

I'm not sure, what will happen, if Drupal turns more into OOP. But I'll keep that in my brain.

Submitted by nk on Sun, 2007-12-30 13:13.

That would not be Drupal any more, I am afraid. So it's additional magic, not less magic.