listen > understand > code > teach

Working on the Drupal 7 Field API

I have recently started working on the Drupal 7 Field API. In Drupal 7 the Content Creation Kit module (CCK) is mainly a user interface that uses the new Field API to do the behind-the-scenes work of attaching fields to objects.

We have lots of coding and testing to do before the code freeze coming up in September 2009 and it's great to be building the future of Drupal. The first issue I took on involved adding the call to hook_field_create_field() to the end of the core function field_create_field(). That invocation was simply left out of the implementation of field_create_field(). In addition, I added an automated test of the hook getting called (using the Drupal 7 core module SimpleTest). You can see this work at http://drupal.org/node/489438. My patch was immediately applied to the Drupal 7 code at testing.drupal.org and run through the battery of automated tests (including my new one). When human reviewers first look at my code, they will already know that it passes those tests.

As a former software engineer, I am particularly heartened by the way the Drupal community continually adopts and evolves the best software engineering practices. Being involved in the Drupal project is a real joy.

[UPDATE: I am happy to report that my change was made part of Drupal 7 core on July 2, 2009. Thanks to bjaspan, webchick, and (of course) Dries for helping me become a Drupal core developer!]

Drupal SEO