NBLUG Library ?

troy fryman at sonic.net
Fri Oct 25 11:26:56 PDT 2002


On Thu, Oct 24, 2002 at 09:49:12PM -0700, augie wrote:
> 
> On Thu, Oct 24, 2002 at 01:51:01PM -0700, troy wrote:
> > I've used peardb and adodb (thanks to postnuke).  Basic functionality is
> > roughly the same but adodb adds some things that probably don't really
> > belong in a DAL.  peardb, i think, is cleaner and certainly better and
> > more consistently documented, especially if you're used to getting your
> > info from the php manual.  peardb is much more similar to Perl::DBI, if
> > you're used to that.  There are functions in adodb for formatting
> > and displaying data as html which can be nice for those quick-n-dirty
> > projects.  But really, familiarity can be gained with either in an hour.
> > If i was to choose for a new project, i'd use pear db.  Actually, i
> > really liked the old phplib stuff...
> 
> this sort of confirms my leaning towards pear, but could you elaborate
> a little bit more on some of the things you think don't belong in
> adodb?
> 

Like i hope i made clear, they both work fine.  I've used both a fair
amount and had no significant problems with either, although i've only
used the MySQL drivers.  It's more a general feeling of cleanliness and
what the libraries seem to be offering.  Peardb provides just the set of
functions to retrieve, store, and query your data.  A *nix attitude.
adodb has functions for paging through data, outputting an entire query
as html, formatting dates...  Being based on Micro$oft's ADO (ActiveX
Data Objects, google tells me), this approach isn't surprising.

Some of this adodb functionality is in separate files, so you don't
have the overhead of parsing *all* that extra stuff unless you need it.
I had forgotten that, until you making me explain myself forced me to
look at the docs again :-)

If you look at adodb.inc compared to pears DB.inc, you'll also see
what i mean by 'cleanliness'  Not that most users of the library will
care how ugly it is or isn't on the inside.

So i'd just say: look at the available functions, peek at the typical
connect(), query(), fetch() sequence and see what makes you warmest and
fuzziest.

-ta



More information about the talk mailing list