Object-Relational Mapping (ORM)
Row-Data-Gateway Pattern, Aktive-Record-Pattern and Table-Data-Gateway-Pattern. I decide this days to use an Object-Relational Mapping (ORM) framework in PHP5 for the resource tier in spooXe. It allows to access the database using a set of objects, providing a simple API for storing and retrieving data. So a lot of obsolete $db stuff and also the class datalist ( crashed my Apache when more than 500 datas in table to get ) in the core code will be history.
The Goals are:
* You don't have to worry about database connections or writing SQL -- unless you want to.
* You never have to worry about escaping data or type-casting results.
* You define your database in a simple XML format (or tell to build it from an existing database) and it will create database initialization files for your database and will generate static classes and objects that provide an OO interface to your database. (It can generate other useful things based on the datamodel too!)
* Supported RDBMS - The ORM currently supports MySQL, PostgreSQL, SQLite, and MS SQL Server. Development of an Oracle driver is in-progress.
* The ORM Framework builds classes which are aware of the structure of your database so there's no performance lost to initialization or to on-the-fly database metadata queries.
Most web application database tasks are really simple -- and with it they'll actually feel as simple as they are. Finally, extensibility is at the heart of it s design; we expect you to want to change and customize things.
Link: http://www.spooxe.com