Hello, On 03/03/2003 02:19 PM, Alexander Deruwe wrote:
In that case you may be interested in Metastorage. It is a persistence layer generator application that generates classes of objects that are mapped to database tables.I'm investigating using PHP's OOP functionality instead of the traditional model to implement a project. I've been looking at information about mapping objects to tables, and have mostly found what
It just takes a very simple description in a XML format of your classes with their variables, validation rules, relationships between objects and the types of functions that you need. Then it generates all for you including the code to install the database schema without any need for you to write a single line of code or SQL.
It is Open Source and you may find more about it here:
http://www.meta-language.net/news-2002-12-05-metastorage.html
http://www.meta-language.net/news-2002-12-09-metastorage.html
http://www.meta-language.net/metastorage.html
The standard solution that Metastorage implements is to have a factory class that takes care of the creation of all objects, either retrieved from the database or created from scratch. The initialization of the factory class takes care of the database setup. Any database connection handles are passed to the new class objects when they are instantiated.When mapping objects to tables, how would one usually handle the actual database object? Suppose we have a class Database derived from
--
Regards,
Manuel Lemos
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php