Data API and JSON/XML for Drupal 6 status
Dries wrote:
here is my top-6 things I'd like to see us focus on. In order of priority: 5. Paving the path for webservices: data API, being more XML/REST/ JSON friendly, etc.
Three relevant patches in the queue are: 1. http://drupal.org/node/145551, Enable dynamic page loading and rendering into different formats (JSON, XML) This patch enables e.g. a normal page request made with jQuery to be returned automatically in JSON format. There is a sample module with the patch to be used for testing. Ideas needed: how could we use the menu system to detect which format to render a particular theme call in? This patch needs a lot of review and improvement. 2. http://drupal.org/node/113435, Data API, first steps (See also, for context, http://drupal.org/node/145684, Data API, further steps.) This patch introduces a consistent set of drupal_load(), drupal_save(), and drupal_delete() methods for different object types as well as a hook_dataapi() to replace hook_nodeapi(), hook_taxonomy(), etc. It also allows all of these methods to be overridden by contrib implementations. So, possibly, we could develop a schema-aware improved Data API in contrib during the 6.x cycle for merging into core before 7. Would need a lot of testing and people wading in to fix and improve it if it's going to get in before code freeze. 3. http://drupal.org/node/140860, Consistent table names to facilitate CRUD operations This is a simple update to provide consistently named tables. The payoff is that we could then implement e.g. drupal_load('term', 8) using a single generic schema-aware function, rather than needing separate load functions for each object type.
participants (1)
-
Nedjo Rogers