Re: PHP Abstraction Layer - Your Opinion Please - Mailing list pgsql-php
From | Manuel Lemos |
---|---|
Subject | Re: PHP Abstraction Layer - Your Opinion Please |
Date | |
Msg-id | 3E30537E.8030003@acm.org Whole thread Raw |
In response to | PHP Abstraction Layer - Your Opinion Please (Andrei Verovski (aka MacGuru) <andreil1@mail.starlett.lv>) |
List | pgsql-php |
Hello, On 01/23/2003 01:51 PM, Andrei Verovski (aka MacGuru) wrote: > I am currently looking for PHP database access abstraction layer which > supports PostgreSQL. > > The choices are: > 1) adodb > 2) metabase > 3) MDB - merge of PEAR and metabase > 4) PEAR only > > I would be very glad if you will share your own experience, either good > or bad, with all pros and cons. If you are looking for a complete solution I would recommend Metabase because it provide true database application portability not only for database access but also for schema management. MDB is basically a version of Metabase with PEAR-DB API. That is why MDB will replace PEAR-DB when the port of the drivers is solid enough. Anyway, now there is something better: Metastorage. It is not quite an alternative but rather a different way to access your databases in a more natural way using OOP classes as wrappers for your classes. This is not really a new approach. What may be new for you is that Metastorage is not just a framework but rather an application that generates all the code for the as classes of your database objects. All you need to do is to define your classes variables in a simple XML file. You can also define validation rules for those variables that may include eventual database lookups. The class definitions may specify relationships with other classes to determine how their objects are related. Then you just specify in the same XML definition the types of operations that your applications needs to store and retrieve objects from the database. From then on Metastorage generates all the code for your classes with the variables and functions that you specified, including an additional class to install the database schema. Basically Metastorage allows you to reduce drastically your database application development time by going from design stage to application deployment in just a few seconds (the compile time) and you no longer have to go through the tedious effort of writing database API code to map your application objects to database tables. For now, Metastorage generates code that is based on Metabase. In the future it wil generate code that will use database specific calls including those for PostgreSQL. In the end the concept of database abstraction API will be obsolete. When that finally happens, you just need to tell Metastorage to regenerate your classes without any change in your application as the classes API will be compatible. Metastorage is Open Source and you may find more information about it here: http://www.meta-language.net/news-2002-12-09-metastorage.html http://www.meta-language.net/metastorage.html -- Regards, Manuel Lemos