Thread: PHP Abstraction Layer - Your Opinion Please

PHP Abstraction Layer - Your Opinion Please

From
Andrei Verovski (aka MacGuru)
Date:
Hi,

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.

Thanks in advance.


Re: PHP Abstraction Layer - Your Opinion Please

From
"Josh Trutwin"
Date:
I only have experience with adodb, but it seems to work great!  Never had
a problem, easy to install.

Josh

> Hi,
>
> 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.
>
> Thanks in advance.



Re: PHP Abstraction Layer - Your Opinion Please

From
"Patrick Hatcher"
Date:
Maybe I didn't understand your question correctly, but in PHP, Postgres
access is built in or at least available via the extension.  Check in the
php.ini file and
look for this line:  ;extension=php_pgsql.dll
remove the semi-colon and you're good to go.





  
                    "Josh Trutwin"
  
                    <josh@trutwins.homei       To:     <pgsql-php@postgresql.org>
  
                    p.net>                     cc:
  
                    Sent by:                   Subject:     Re: [PHP] PHP Abstraction Layer - Your Opinion Please
  
                    pgsql-php-owner@post
  
                    gresql.org
  

  

  
                    01/23/2003 09:33 AM
  

  

  




I only have experience with adodb, but it seems to work great!  Never had
a problem, easy to install.

Josh

> Hi,
>
> 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.
>
> Thanks in advance.



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org





Re: PHP Abstraction Layer - Your Opinion Please

From
Manuel Lemos
Date:
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