Hello all,
Would there be significant community interest in an object-relational mapper module? Such a module would have the following basic features:
Data Abstraction: XML code would define the mapping between form elements, nested data structures and database fields. It would also be where entity 'finders' would be defined (specifying WHERE, ORDER, LIMIT clauses and parameters here). Adding a new database field to your module would involve altering the the database table and adding a line of XML. The new field would henceforth be available to your module code (data, form element, load/save/update/delete would 'magically' accommodate the new field).
Standard Tools: If defaults are acceptable, then all tools for displaying entities (nodes), listing entities, load, save, update and delete will be provided by this module. Module authors would only need to call the appropriate function or method.
Enhanced Performance: With the data abstraction layer, it becomes possible to do caching behind the scenes. Entities could be created using lazy materialization, where the module would only get the value from the db when it's actually requested (otherwise, name and primary key reside as place-holders).
Nested Data Structures: Other types of entities could be aggregated or composed by an entity. Finders would be used to relate the two types. Properties in the XML file would define the level of recursion to limit the query to for self-referencing entities.