Re: Re: PHP vs. ASP
| From: | Rasmus Lerdorf | Date: | Wed, 09 Jan 2002 21:13:30 +0000 |
| Subject: | Re: Re: PHP vs. ASP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-79959@lists.php.net to get a copy of this message | ||
> I actually was going to mention it, because I know it's being worked on
> - last I read it was 'beta' or something similar, and only supported a
> handful. My understanding was that even it was still a wrapper system,
> but it's definitely a welcome (huge) step in the right direction, in our
> estimation here. :)
Every abstraction layer is by definition a wrapper.
I am sure everyone by now has heard my opinion on db abstraction layers
though. As far as I am concerned they are pointless. It is the wrong
place to do things. The right way to do database abstraction is at the
functional layer. ie. write a function that implements a certain database
action your application needs. get_user_record(), for example. Then
write this function for each database your application needs to support.
Anything short of this and you end up with a nearly useless system that is
only capable of using generic or lowest-common-denominator SQL statements.
For really simple applications that is ok, I guess, but for anything
substantial you are going to have to use DB-specific SQL to take advantage
of each database properly. See Oracle's DECODE() statement for a blatant
example of this.
-Rasmus