Kicking off Drupalcon with APIs

Drupalcon is off to a great start. Yesterday afternoon and this morning we met all kinds of great Drupal folks while passing out the free Acquia t-shirts and sharing the news about several recent releases. If you haven't had the chance to check out the new Acquia Drupal Stack Installers. The installers bring a Windows and Mac OS X installer to the desktop that install and setup all of the components necessary (Apache, MySQL, PHP and Acquia Drupal) to get started running a Drupal site.

After getting to talk to many fellow Drupal community members this morning it was off to the first session of the day, Jeff Eaton's Building APIs that Rock session. Jeff (eaton) with the help of George, a puppet whose voice bears a strong resemblance to Mr. Earl Miles (merlinofchaos), is showing the power of APIs. After starting with a general discussion of how modules and their code could be thought of as a large stack of cash and API's as the ways that different interfaces, ATM's, bank tellers, and credit cards are the interfaces that use the API to access the stacks o' cash. Returning to the Drupal world Jeff pointed out how George has implemented a module, Views, that is really two separate parts, the underlying API and a user interface for it (Views UI). With that design it is possible for other modules to define alternative interfaces for how to create, edit and display views.

Following the metaphor and pretty pictures, Jeff delves into the evolution of the VotingAPI and the process of evolving APIs by breaking down what the module needs to do by breaking the needs down and thinking of them as nouns and verbs. Complete with colorful metaphors and fun illustrations Jeff and George walked through how to use the hook system to implement and use APIs.

Jeff's presentation wrapped up with the seven deadly sins of APIs. A great summary of some traps to be avoided when designing your API's. As with many things in the community the big take-away boils down to communicating with others in the community. And now we'll conclude this post by using the Twitter module and API to post this summary.

Category: