Re: Extending Net/
| From: | Kendrick Vargas | Date: | Sat, 27 Jan 2001 20:24:46 +0000 |
| Subject: | Re: Extending Net/ | ||
| References: | 1 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-1202@lists.php.net to get a copy of this message | ||
On Fri, 26 Jan 2001, Chuck Hagenbuch wrote:
> Quoting Joey Smith <joey@joeysmith.com>:
>
> > You're right, PHP already had native support for many of the things I
> > mentioned. But PHP already has support for Sybase and MySQL natively,
> > why would I want to use PEAR's DB_mysql?
>
> Okay - but I think there's a difference there. Different database
> servers are still SQL (well, mostly :/ ); I'm hard pressed to think of
> a similar example where you'd want the same logic/code and just switch
> in a different driver, on a general level. I can think of plenty of
> application-specific reasons for doing so - preferences storage, etc -
> but those, IMHO, don't belong in PEAR.
>
> Maybe people _do_ want these wrappers. And that's fine, and if they're
> made, yes, they should go into Net/. I'm just not convinced yet of
> their worth.
One of the problems I've seen with PHP that could easily be solved by PEAR
is the inconsistencies with the function names. While a wrapper around
existing functionality might produce overhead, the ease of use might pay
off for the programmer in the end. The logic for something like this is
that if the programmer is truly worried about the overhead incurred by
using the wrappers in PEAR for certain things, then they wouldn't be using
wrappers at all, DB or not. Anyone sufficiently concerned with performance
is gonna skip over PEAR alltogether.
Besides, with cache engines popping up all over the place, I think the
overhead of PEAR might be significantly minimized to the point that it
wouldn't be _THAT MUCH_ of a concern.
Maintaining consistency is a wonderful thing. It allows someone to worry
less about figuring out what it takes to do something and simply focus oh
how to do it. I think it would be a good thing to have wrapper functions
for various things. The trick is deciding when you're going overboard and
when you're actually adding functionality. I am in complete agreement that
PEAR should not become a kitchen-sink repository, but I don't think that
simple wrappers (within reason) would violate that at all.
-peace
--- BEGIN GEEK CODE BLOCK ----------+----------
GAT d- s:+ !a C++$ UL/S/I/B++++$ P+ | "In the ongoing battle between objects
L++ E- W+(+++) N K- w(---) O-- M@ | made of aluminum going hundreds of
V(--) PS+++ PE Y+ PGP@ t++ 5 X+ R- | miles per hour and the ground going
tv+ b- DI++++ D+(+++) G e>++ h--- | zero, the ground has yet to lose."
r++ z+>+++ - END GEEK CODE BLOCK ---+