Article for conference booklet:
The session will introduce the Field API intended for Drupal core. The Field API supports "CCK fields in core" as a new central concept for organizing content as an eventual replacement for the Node API model.
Drupal's strategic advantage in the market (its "secret sauce") is an architecture that allows contributed modules to easily valueadd content in the system. That design allows for very rapid development of new functionality, both of general use and of use specific to a single installation.
The future of the web is interoperability and web services. Drupal's current architecture is illequipped at present to take advantage of that, as it is largely bound to a single, entirely local data workflow (nodes) that lives essentially in a vacuum. For Drupal to continue to lead the CMS/community plumbing market, it needs to refocus its data handling to seamlessly integrate both local and remote data and be able to mix and match the two.
The Field API is an attempt to integrate an evolved, more robust CCKlike system into Drupal core. A Field is the basic unit of rich content (i.e., "email address" and "comment", not "string" and "int"), be it local or remote, and Fields are organized into Nodes or Entities. The goal is to get away from the "giant blob of data" that is the current node object; it is not an acceptable way forward.
This example shows how the current Field API can be used to create a new local data field called "summary" for a content type called "article":
<?php
// Create a field.
$field = new TextField('summary');
field_create_field($field);
// Create a field instance.
$content_type = 'article';
$instance = new TextFieldInstance('summary', 'article', 'text_textarea');
$instance->widget->weight = 5;
$instance->widget->label = t('Summary');
$instance->widget->description = t('A short summary of this article.');
$instance->widget->rows = 10;
field_create_instance($instance);
?>
Bios for conference booklet:
Barry is an entrepreneurially-minded computer programmer with a strong focus on computer security and privacy. Prior to Acquia, Barry spent two years as a Drupal core developer; he also created interMute, the first commercial web annoyance blocker, and Spamnix, a spam-blocking product. Barry is a maniacal whitewater kayaker and rock climber and generally spends his time wherever rocks, water, and gravity dance.