Home

Lullabot

Lullabot Ideas

We know stuff. We empower you to know stuff too.

Drupal Module Development Deep Dive Week

London, UK
September 20-24, 2010

Drupal Voices 21: Larry Garfield Explains Object-Oriented Programming

Listen online: 
  • play
  • pause
  • stop
  • min volume
  • max volume
  • DrupalVoices021.mp3

Larry Garfield of Palantir.net talks about the differences between Procedural Coding and Object-Oriented Programming as well as the vertical extensibility of OOP.

Larry was very involved with the Go PHP 5 initiative to encourage hosting providers to upgrade from PHP4, and as a result of the success of this effort, Drupal 7 will be the first release that will require PHP5. For the first time, Drupal will be able to use the more evolved Classes and Objects features of PHP5.

Larry gave a Drupalcon presentation on Objectifying Drupal: An introduction to OOP and has some strong thoughts on how the core of Drupal should and should not use OOP.

You can read more about his Handlers proposal that he mentions here and get the latest updates on it from here.

Download

April 27, 2009 - 11:21am
Drupal Voices
10:22 minutes (5.76 MB)
stereo 44kHz 77Kbps (vbr)

Download

Comments

Anonymous (not verified) on April 28, 2009 - 1:21am

Horizontal vs Vertical Extensibility

Awesome interview. There are a few things that I don't really understand, though.

He mentions that Drupal is horizontally extensible using modules and hooks, but that it's hard to do vertical extensible. What exactly does that mean? He seems to say that procedural code is used for horizontal extendability and object oriented code used for vertical extendability. Is that true?

Larry Garfield (not verified) on May 4, 2009 - 12:06am

Vertical vs. Horizontal

Disclaimer: I am somewhat making those terms up myself; they're not an industry standard term as far as I know. :-)

By horizontal extensibility, I mean things like form_alter. Modules can extend Drupal "sideways".

By vertical extensibility, I mean replacing existing systems or behavior rather than augmenting them.

For example, there are hooks for modules to add new stuff to the search system. There is no built-in support for changing the search engine itself, however, without disabling the search module and starting entirely from scratch.

Have a look at the first diagram in the remote data blog I posted recently. That should make it clearer what I mean. You can add more stuff horizontally next to what's already there, but changing what's already there in the stack is harder than it should be. That is, however, something that OO is inherently very good at. You just have an object that conforms to an interface, and then you can swap it out for another object of the same interface and keep working (assuming the way you instantiate the object is properly designed).

See the blog posts mentioned in the Handlers issue (the first "here" link in the summary) for extensive background on the subject.

May 4, 2009 - 5:57pm Kent Bye

Thanks Larry

I Googled briefly for a resource on the distinction between vertical and horizontal extensibility and didn't find one, so thanks for creating the definitive source. :)

Subscribe to Podcasts

  • RSS All Lullabot Podcasts
  • iTunes RSS Lullabot Podcast
  • iTunes RSS Drupal Voices
  • iTunes RSS All Videocasts

Similar

  • Drupal Voices 158: Emma Jane Hogbin on PHP for Designers
  • Drupal Voices 160: Moshe Weitzman on Page Rendering in Drupal 7
  • Drupal Voices 159: John Albin Wilkins on Drupal 7 Theming
  • Drupal Voices 145: John VanDyk on Batch API and Queue APIs
  • Drupal Voices 140: Nathaniel Catchpole on Drupal 7 performance improvements
  • Drupal Voices 138: Khalid Baheyeldin on Performance & Scalability Strategy
  • Drupal Voices 137: Narayan Newton on the Future of MySQL Forks and Patches
  • Drupal Voices 136: Karoly Negyesi on MongoDB and NoSQL databases
 
  • Home
  • Services
  • Events
  • Ideas
  • Store

Connect the Bots:

Twitter Facebook YouTube blip.tv All Posts Newsletter
  • Ideas
  • Blog
  • Podcasts
  • Videos
  • About
  • Contact
  • Jobs
  • Services
    • Training
  • Events
    • Training Workshops
    • Other Events
    • Conferences
    • Calendar
  • Products
    • Videos
    • Books
    • Swag
  • Ideas
    • Blog
    • Podcast
    • Videos
  • About
    • Philosophy
    • Team
    • Presskit
  • Contact
    • General
    • Work Inquiries
    • Mailing List