Announcing: DAO
I’ve been working for many months now on a home jukebox project, and finally have a (very unexciting) piece far enough along to release.
DAO is a part of the PHP client interface to the jukebox. DAO is a database object abstraction layer for PHP, inspired in part by DB::DataObject, which is part of PEAR.
Relative to DB::DataObject, DAO:
- is simpler in design:
- no cursor pool
- no .ini files
- updates affect changed fields only, by default
- is more idiot-proof:
- guards against inadvertent update/delete all
- clean, easy join and related object support
- is more extensible:
- SQL generation operations are broken out into build methods, not bundled into generate-and-send methods
- is more compatible:
- supports sequences and auto_increment
- offers cleaner error handling:
- methods always return PEAR::Error in event of error
- last error seen is preserved in error property
DAO is also not likely to ever be included in PEAR itself.
The DAO API documentation is here.
DAO is released as a PEAR package, which you can download here, and install with the pear installer (or just untar it and copy the file DAO.class.php to somewhere in your php library path).
The remaining, more exciting pieces of PJ (which stands for P[HP/ython] Jukebox) will be released under the GPL as well, as soon as they’re reasonably complete and documented. Not all that soon, in other words.
Filed under: projects

0 Comments:
Post a Comment
<< Home