Re: [PHP4BETA] Re: Couldn't find your reference

From: Date: Thu, 18 Nov 1999 15:26:10 +0000
Subject: Re: [PHP4BETA] Re: Couldn't find your reference
References: 1  Groups: php.dev php.version4 
Request: Send a blank email to php-version4+get-6449@lists.php.net to get a copy of this message
On Thu, 18 Nov 1999, Chad wrote: | > Bingo. This (database interface dependency) IMO is the biggest problem | > that needs to be solved with PHP. It supports a wide variety of | > databases with APIs that are very similar in function, but they're all | > different. We do a lot of work with MySQL and Oracle around here, and | > with Perl/DBI you can often go from one to the other with no changes at | > all (except the connection string). It couldn't possibly be easier. | | Just to comment, I felt this comment was a bit much. Database | Abstraction is a good options to have, but I think the biggest problem | with DBI is that it's ALL you have. Sure you can call functions, but | then your code is no longer portable. In a case like that I think it's | better to not abstract the API, but to abstract the database | interactivity itself by having your app call generic routines like | getData and then have a plug in script/module that can get the data | however it wishes from the database. This is the only way to truly allow | your app to work cross database. However, in many cases a simple | abstraction of the API is enough, but I'm not convinced this is | something that would be that advantageous to put in php as opposed to | just doing an abstraction in php (such as phplib and phpDB do). | Performance might be a bit better with it native, but with php4, is it | really going to matter? I think it should be more like what perl does, | where it's not a part of the core language, but rather another module | that can be downloaded. But perl has a bit more advanced idea of | packages, so that might be something that needs to be addressed. The fact that PHP doesn't have it yet means that not all the developers agree that a DBI-like interface is what PHP lacks the most. At least other things have been are being prioritized before it. PHP will get it as soon as someone generates enough interest to make it happen. I wrote up a suggestion/spec this summer that is available on http://www.guardian.no/~ssb/php-db-abstraction.html. Let me know what you think about it. - Stig

« previous php.version4 (#6449) next »