Re: Opinions Requested - PG API or Abstraction Layer

From: Mitch Pirtle <mitch(dot)pirtle(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Opinions Requested - PG API or Abstraction Layer
Date: 2004-09-14 00:41:00
Message-ID: 330532b6040913174194deeea@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Fri, 10 Sep 2004 10:30:09 -0700, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> I'd say these are your two reasonable choices. Regrettably, the Pear
> database classes seem to have lost momentum to adodb lately.

Then you need to update your reference to 'lately' ;-)

PEAR::DB has gone through great leaps and bounds (not just
functionality but documentation as well) - you should definitely
compare ADOdb and PEAR::DB before making a decision.

I like ADOdb's query caching, and also make use of the non-db goodies
(like generating HTML dropdown form elements from the result of a
query) as well as generating INSERT statements from form submissions
(without having to test to see if values were submitted or not).
Don't forget ADOdb's XML goodies that allow you to reverse engineer a
database, define changes, and then apply those changes (or repeat on
another platform entirely).

OTOH, PEAR::DB has awesome documentation, very good support for
prepared statements (great for many similar repeated statements), and
has also undergone pretty dramatic performance improvement. The
maintainer is very friendly and approachable.

Here is another thought - I have seen folks start out thinking "Hey,
I'll just use the native pgsql functions, and wrap them in a class to
simplify the interface." Next thing you know they are more-or-less
repeating the efforts of the two projects above, and usually with less
resources (and success). So if you are going to wrap your calls in a
class, why not use one of the leaders?

-- Mitch, hoping this helps

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-09-14 00:51:40 Re: Trouble EXITing plpgsql labeled BEGIN blocks with DECLAREs
Previous Message Karl O. Pinc 2004-09-14 00:35:56 Trouble EXITing plpgsql labeled BEGIN blocks with DECLAREs

Browse pgsql-novice by date

  From Date Subject
Next Message Mitch Pirtle 2004-09-14 00:47:22 Re: Subnovice question
Previous Message Michael Fuhr 2004-09-13 22:02:26 Re: nextval() clarification