Mechanical Robot Fish

The Mixed-Up Thoughts of Michael Francis Booth

Drupal's Data Structures and the Properties Pattern

I might be crazy, but as I read Steve Yegge’s essay on the Properties Pattern I felt as if I was being introduced to something I already knew. And that’s not just because the essay describes Javascript. I think that’s because Properties lists are the fundamental Drupal data structure.

This line stuck out:

I’ve talked about the main problems imposed by the Properties pattern: performance, data integrity, and navigability/queryability. They’re all trade-offs; you’re sacrificing in these areas in order to achieve big wins in flexibility and open-ended future extensibility for users you may never meet.

Yep, that sure sounds like Drupal’s $node, $user, and $form objects to me.