pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PHP Abstraction layers
12+ messages / 6 participants
[nested] [flat]

* PHP Abstraction layers
@ 2002-01-20 16:39  Francisco Reyes <lists@natserv.com>
  0 siblings, 3 replies; 12+ messages in thread

From: Francisco Reyes @ 2002-01-20 16:39 UTC (permalink / raw)
  To: pgsql-php

I am seeking feedback/comments/recommendations on an abstraction layer to
use for our development. So far I have found that the following layers
exists:PHPLib, ADODB, PEAR DB, MetatData

I have only seen examples from Pear and will try to see examples from the
others, but I am wondering if anyone who has tried them could provide
feedback.






^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-21 02:14  Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  parent: Francisco Reyes <lists@natserv.com>
  2 siblings, 2 replies; 12+ messages in thread

From: Christopher Kings-Lynne @ 2002-01-21 02:14 UTC (permalink / raw)
  To: Francisco Reyes <lists@natserv.com>; pgsql-php

I think ADODB kicks arse.  Very fast, etc. 

Chris

> -----Original Message-----
> From: pgsql-php-owner@postgresql.org
> [mailto:pgsql-php-owner@postgresql.org]On Behalf Of Francisco Reyes
> Sent: Monday, 21 January 2002 12:39 AM
> To: PostgresSQL PHP list
> Subject: [PHP] PHP Abstraction layers
> 
> 
> I am seeking feedback/comments/recommendations on an abstraction layer to
> use for our development. So far I have found that the following layers
> exists:PHPLib, ADODB, PEAR DB, MetatData
> 
> I have only seen examples from Pear and will try to see examples from the
> others, but I am wondering if anyone who has tried them could provide
> feedback.
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
> 




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-21 05:14  Gurudutt <guru@indvalley.com>
  parent: Francisco Reyes <lists@natserv.com>
  2 siblings, 1 reply; 12+ messages in thread

From: Gurudutt @ 2002-01-21 05:14 UTC (permalink / raw)
  To: pgsql-php

Hello Francisco,

I find "PEAR DB" particularly a wonderful data abstraction layer. I
have been working with for a long time and so far I have had minor
difficulties while porting from one database to another.

I have worked with PEAR DB on three databases, MySQL with BDB tables,
Postgresql and Oracle. It works fine with all the three, but I must
confess my working with Oracle based data interface is limited.

Just one small aspect to be taken care of while using PEAR DB is that,
u need to use quotes to enclose the fields.

Speed of operation is very good in terms that, user hardly notices the
difference of data abstraction layer being present.

-- 
Best regards,
 Gurudutt                            mailto:guru@indvalley.com

Life is not fair - get used to it.
Bill Gates

Sunday, January 20, 2002, 10:09:21 PM, you wrote:

FR> I am seeking feedback/comments/recommendations on an abstraction layer to
FR> use for our development. So far I have found that the following layers
FR> exists:PHPLib, ADODB, PEAR DB, MetatData

FR> I have only seen examples from Pear and will try to see examples from the
FR> others, but I am wondering if anyone who has tried them could provide
FR> feedback.




FR> ---------------------------(end of broadcast)---------------------------
FR> TIP 3: if posting/reading through Usenet, please send an appropriate
FR> subscribe-nomail command to majordomo@postgresql.org so that your
FR> message can get through to the mailing list cleanly




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-21 09:38  Jean-Michel POURE <jm.poure@freesurf.fr>
  parent: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  1 sibling, 1 reply; 12+ messages in thread

From: Jean-Michel POURE @ 2002-01-21 09:38 UTC (permalink / raw)
  To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; Francisco Reyes <lists@natserv.com>; pgsql-php

Le Lundi 21 Janvier 2002 03:14, Christopher Kings-Lynne a écrit :
> I think ADODB kicks arse.  Very fast, etc.

ADODB is a good solution if you whish to use it 'alone', whithout any other 
libraries. If you need a framework of PHP objects go for PEAR DB (PEAR 
framework) or MetaData (BinaryCloud framework).

BinaryCloud framework is much more advanced than PEARDB. Metadata can handle 
nearly all PostgreSQL objects. It has better design. Maybe you could have a 
try at it.

Best regards,
Jean-Michel POURE



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-21 17:11  Francisco Reyes <lists@natserv.com>
  parent: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  1 sibling, 1 reply; 12+ messages in thread

From: Francisco Reyes @ 2002-01-21 17:11 UTC (permalink / raw)
  To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: pgsql-php

On Mon, 21 Jan 2002, Christopher Kings-Lynne wrote:

> I think ADODB kicks arse.  Very fast, etc.
> Chris

I have got good feedback about ADODB, but has anyone used ADODB and PEAR
DB? I would like some level of comparison.




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-21 17:25  Francisco Reyes <lists@natserv.com>
  parent: Jean-Michel POURE <jm.poure@freesurf.fr>
  0 siblings, 0 replies; 12+ messages in thread

From: Francisco Reyes @ 2002-01-21 17:25 UTC (permalink / raw)
  To: Jean-Michel POURE <jm.poure@freesurf.fr>; +Cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; pgsql-php

On Mon, 21 Jan 2002, Jean-Michel POURE wrote:

> ADODB is a good solution if you whish to use it 'alone', whithout any other
> libraries.


Thanks for the feedback. This is along the lines of what I was looking
for. From what I have read ADODB is best for people coming from a MS
world. I wouldn't count myself on that crowd.

>If you need a framework of PHP objects go for PEAR DB (PEAR
> framework) or MetaData (BinaryCloud framework).

That is certainly along the lines of what I am looking for.


> BinaryCloud framework is much more advanced than PEARDB. Metadata can handle
> nearly all PostgreSQL objects. It has better design. Maybe you could have a
> try at it.

Care to expand a little on this. What do you mean by "can handle nearly
all pgsql objects"? Do you have an URL for MetaData? Is this the same as
what is on the phpclasses site? (phpclasses.upperdesign.com)




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-21 17:37  Francisco Reyes <lists@natserv.com>
  parent: Gurudutt <guru@indvalley.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Francisco Reyes @ 2002-01-21 17:37 UTC (permalink / raw)
  To: Gurudutt <guru@indvalley.com>; +Cc: pgsql-php

On Mon, 21 Jan 2002, Gurudutt wrote:

> Hello Francisco,
>
> I find "PEAR DB" particularly a wonderful data abstraction layer. I
> have been working with for a long time and so far I have had minor
> difficulties while porting from one database to another.


Thanks for the feedback. I think so far I am leaning to PEAR or MetaData.


> I have worked with PEAR DB on three databases, MySQL with BDB tables,
> Postgresql and Oracle. It works fine with all the three, but I must
> confess my working with Oracle based data interface is limited.

So far my targers are PostgreSQL and Oracle. Although I actually don't
expect a lot of apps moving from PostgreSQL to Oracle, there is a second
part of abstraction layers that people miss. It helps in terms of learning
and reducing production costs. If my team learns one good API which we can
use with both PostgreSQL and Oracle then when we need to develop Oracle
apps it would take us less time.




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-21 22:20  Brent R. Matzelle <bmatzelle@yahoo.com>
  parent: Francisco Reyes <lists@natserv.com>
  0 siblings, 0 replies; 12+ messages in thread

From: Brent R. Matzelle @ 2002-01-21 22:20 UTC (permalink / raw)
  To: pgsql-php

--- Francisco Reyes <lists@natserv.com> wrote:
> On Mon, 21 Jan 2002, Christopher Kings-Lynne wrote:
> 
> > I think ADODB kicks arse.  Very fast, etc.
> > Chris
> 
> I have got good feedback about ADODB, but has anyone used ADODB and
> PEAR
> DB? I would like some level of comparison.

I find ADODB to be totally overkill and messy for just about any
application.  PEAR DB has a nice and clean interface but it is tied
into the still rather immature PEAR classes which bothers me.  I
personally use the PHPLIB DB abstraction and I find it very fast and
clean.  Each database abstraction library is self-sufficient, unlike
PEAR DB.  Plus thousands of programmers have been using PHPLIB for
years so it is mature and has a great user base.  It is not perfect
but it has functioned beautifully for several large projects I have
worked on.

Each DB layer has its advantages and disadvantages.  My suggestion is
to try each of them for a couple dozen lines of code and see which
one you like.  

Brent

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-22 04:02  Manuel Lemos <mlemos@acm.org>
  parent: Francisco Reyes <lists@natserv.com>
  2 siblings, 1 reply; 12+ messages in thread

From: Manuel Lemos @ 2002-01-22 04:02 UTC (permalink / raw)
  To: Francisco Reyes <lists@natserv.com>; +Cc: pgsql-php

Hello,

Francisco Reyes wrote:
> 
> I am seeking feedback/comments/recommendations on an abstraction layer to
> use for our development. So far I have found that the following layers
> exists:PHPLib, ADODB, PEAR DB, MetatData
> 
> I have only seen examples from Pear and will try to see examples from the
> others, but I am wondering if anyone who has tried them could provide
> feedback.

If you are looking for a database abstraction package that provides true
database independence to your applications or components, you may want
to try Metabase (not Metadata).

Metabase provides true abstraction of database types. This means in
practice that from the point of view of the applications it always
handles data formatted in the same way regardless of how it is
represented in the database.

For instance, if your application deals with dates, it only sees them
formatted according to the ISO 9601 standard (YYYY-MM-DD) even if the
underlying databases represents dates in other format. Metabase will
take care of datatype conversions if necessary when storing or
retrieving data from the database.

A direct consequence of this, is that if you switch between databases
you will not need to touch your application.

Metabase was thought not only for database independence but also for Web
database programming in particular, so it offers some features that take
in consideration the constraints of Web programming.

Metabase pioneered the abstraction of things like providing a way to
offer the LIMIT clause functionality but in a way that works in all
supported database besides MySQL ( PostgreSQL, Oracle, MS SQL server,
Interbase, Informix, MiniSQL, ODBC, etc..). This is important for
display query results split in multiple pages. This class is based on
Metabase and takes advantage of this feature to display query results in
HTML tables eventually with a navigation bar that lets you go back and
forth between the different pages of the results.

http://phpclasses.upperdesign.com/browse.html/package/130

Metabase also pioneered the use of sequences in such way that it works
with databases that do not support sequences natively but support
auto-incremented table fields. This is important to insert entries with
unique id fields that are usually the table primary keys. The sequence
generation is always an atomic process, so no matter how many entries
may be entered into a table by simultaneous users, it is always done in
a consistent manner.

Another key feature of Metabase is the ability to install and maintain
database schemas. All you need to do is to describe your database
schemas in a custom XML file that specify the names and properties of
your tables, fields, indexes and sequences, all in a database
independent format.

Metabase manager class is able to process that schema description and
install it for you, no sweat. If some day you need to change that
schema, and often you need to, you just need to change the schema
description file. Then Metabase manager is able to process it and
compare with the previously installed schema to figure the changes that
were done and applying them safely to your schema. This is done without
affecting the data that was added after the first time the schema was
installed or updated for the last time.

A new release of Metabase was made just yesterday. It provides some
features that users were requesting like the ability to customize error
handling. It also provides yet another innovating features, which is the
SQL REPLACE implementation. This is a statement like SQL INSERT except
that if the values of the primary keys match the ones of an existing
row, it will update that row instead of inserting a new one. AFAIK, only
MySQL provides SQL REPLACE command, but Metabase provides a suitable
emulation that works the same way using transactions so it works also
with PostgreSQL, Oracle, MS-SQL server, Informix, Interbase, etc..

One important new feature is a set of new functions to fetch result set
data in a single call. These functions were contributed Lukas Smith and
Christopher Linn and are meant to end the complaints of some users that
claim that other PHP database abstraction packages are faster than
Metabase because they can fetch whole rows of data at once. These new
functions in Metabase should end those complaints.

Anyway, it is better for you to try it yourself. Metabase documentation
is through and very complete. There is also a small tutorial to get you
started quickly. If for some reason Metabase does not offer some
facility you need, you may want to contact me to tell about it, or
better implement it yourself and contribute your work to features
yourself in the hall of fame of Metabase contributors.

Metabase is free and is distributed with a BSD Open Source licence. For
those that don't know Metabase, you may find it here:

http://phpclasses.UpperDesign.com/browse.html/package/20

Regards,
Manuel Lemos



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-22 04:40  Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  parent: Manuel Lemos <mlemos@acm.org>
  0 siblings, 2 replies; 12+ messages in thread

From: Christopher Kings-Lynne @ 2002-01-22 04:40 UTC (permalink / raw)
  To: Manuel Lemos <mlemos@acm.org>; Francisco Reyes <lists@natserv.com>; +Cc: pgsql-php

> A new release of Metabase was made just yesterday. It provides some
> features that users were requesting like the ability to customize error
> handling. It also provides yet another innovating features, which is the
> SQL REPLACE implementation. This is a statement like SQL INSERT except
> that if the values of the primary keys match the ones of an existing
> row, it will update that row instead of inserting a new one. AFAIK, only
> MySQL provides SQL REPLACE command, but Metabase provides a suitable
> emulation that works the same way using transactions so it works also
> with PostgreSQL, Oracle, MS-SQL server, Informix, Interbase, etc..

*cough* Callling it 'SQL REPLACE' is a bit of a misnomer.  It is not
specified anywhere in the SQL standard. (Like lots of MySQL stuff)

Chris




^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-22 05:01  Manuel Lemos <mlemos@acm.org>
  parent: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  1 sibling, 0 replies; 12+ messages in thread

From: Manuel Lemos @ 2002-01-22 05:01 UTC (permalink / raw)
  To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: Francisco Reyes <lists@natserv.com>; pgsql-php

Hello,

Christopher Kings-Lynne wrote:
> 
> > A new release of Metabase was made just yesterday. It provides some
> > features that users were requesting like the ability to customize error
> > handling. It also provides yet another innovating features, which is the
> > SQL REPLACE implementation. This is a statement like SQL INSERT except
> > that if the values of the primary keys match the ones of an existing
> > row, it will update that row instead of inserting a new one. AFAIK, only
> > MySQL provides SQL REPLACE command, but Metabase provides a suitable
> > emulation that works the same way using transactions so it works also
> > with PostgreSQL, Oracle, MS-SQL server, Informix, Interbase, etc..
> 
> *cough* Callling it 'SQL REPLACE' is a bit of a misnomer.  It is not
> specified anywhere in the SQL standard. (Like lots of MySQL stuff)

Still it is a good thing (tm). SQL standard is also a bit misnomer
because every database vendor ships its own extensions and its own
non-standard compliant quirks. My favourite is that Oracle stores empty
strings in VARCHAR fields as NULLs. :-)

Regards,
Manuel Lemos



^ permalink  raw  reply  [nested|flat] 12+ messages in thread

* Re: PHP Abstraction layers
@ 2002-01-22 14:12  Francisco Reyes <lists@natserv.com>
  parent: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  1 sibling, 0 replies; 12+ messages in thread

From: Francisco Reyes @ 2002-01-22 14:12 UTC (permalink / raw)
  To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: Manuel Lemos <mlemos@acm.org>; Francisco Reyes <lists@natserv.com>; pgsql-php

On Tue, 22 Jan 2002, Christopher Kings-Lynne wrote:

> > A new release of Metabase was made just yesterday. It provides some
> > features that users were requesting like the ability to customize error
> > handling. It also provides yet another innovating features, which is the
> > SQL REPLACE implementation. This is a statement like SQL INSERT except
> > that if the values of the primary keys match the ones of an existing
> > row, it will update that row instead of inserting a new one. AFAIK, only
> > MySQL provides SQL REPLACE command, but Metabase provides a suitable
>
> *cough* Callling it 'SQL REPLACE' is a bit of a misnomer.  It is not
> specified anywhere in the SQL standard. (Like lots of MySQL stuff)
> Chris

We can discuss names, till the cows come home, but basically Manuel
described what he meant. The "replace" functionality is one of the few
things I liked of MySQL when I researched which dB to go with. The fact
that this layer can abstract the functionality is a great point in my
opinion.




^ permalink  raw  reply  [nested|flat] 12+ messages in thread


end of thread, other threads:[~2002-01-22 14:12 UTC | newest]

Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-20 16:39 PHP Abstraction layers Francisco Reyes <lists@natserv.com>
2002-01-21 02:14 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2002-01-21 09:38   ` Jean-Michel POURE <jm.poure@freesurf.fr>
2002-01-21 17:25     ` Francisco Reyes <lists@natserv.com>
2002-01-21 17:11   ` Francisco Reyes <lists@natserv.com>
2002-01-21 22:20     ` Brent R. Matzelle <bmatzelle@yahoo.com>
2002-01-21 05:14 ` Gurudutt <guru@indvalley.com>
2002-01-21 17:37   ` Francisco Reyes <lists@natserv.com>
2002-01-22 04:02 ` Manuel Lemos <mlemos@acm.org>
2002-01-22 04:40   ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2002-01-22 05:01     ` Manuel Lemos <mlemos@acm.org>
2002-01-22 14:12     ` Francisco Reyes <lists@natserv.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox