[development] Data API

Jeremy Epstein jazepstein at gmail.com
Mon Sep 4 04:55:57 UTC 2006


On 9/3/06, Frando (Franz Heinzmann) <frando at xcite-online.de> wrote:
> I think by extending the FormAPI concept to a Data API we can ease and
> simplify drupal module development quite a lot. By adding some more
> "magic", as some scaffolding here and there or considering the fAPI
> arrays not as description of forms but as data models, lots of things
> (as different methods of interacting with a website, e.g. XML-RPC or
> import/export modules) would be far easier to realize.

The Import / Export API module (my Summer of Code project -
<http://drupal.org/project/importexportapi>) goes some way towards
achieving this. A big part of the module is its "data definition"
system, which allows any entity within Drupal to be represented as a
structured array. This is basically a "data API", and it is certainly
a candidate for how we could implement a "model" layer in core.

My implementation of a data model is a bit different to the examples
that Adrian has given, but I think that the general direction is the
same. My work probably contains a lot of stuff that is specific to
data models for import/export, which won't be necessary in core.
Hopefully we'll be able to take the best of everyone's ideas, when it
comes time to actually coding the data model layer that will (most
likely) form the new foundation of FAPI 3.0.

Oh, wait... I mean, DAPI... whatever :P

Cheers,
Jaza.


More information about the development mailing list