Re: OO wrappers (was : Need 1 more vote for Image_IPTC class)
| From: | Xavier Noguer | Date: | Tue, 08 Apr 2003 14:37:37 +0000 |
| Subject: | Re: OO wrappers (was : Need 1 more vote for Image_IPTC class) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15033@lists.php.net to get a copy of this message | ||
El Mar 08 Abr 2003 10:09, Lukas Smith escribió:
> > From: Xavier Noguer [mailto:xnoguer@rezebra.com]
> > Sent: Tuesday, April 08, 2003 4:02 PM
..
> > In my opinion PEAR packages shouldn't use wrappers. It's one thing to
> > create
> > an OO wrapper so that people have more choices for using a certain
> > functionality, and another one to force anyone using a different
> > functionality to have to deal with the overhead of that wrapper.
>
> So you prefer a CS mix?
> Especially if these classes are extended we get huge problems with
> naming conventions. Actually as the core of PHP becomes more and more OO
> friendly we will find ourselves often in this situation (see the
> Exception class Sterling is writing). Then we might as well through the
> PEAR CS out the window now.
I'm not following you. I don't see how:
$foo = new Foo();
$foo->bared();
is better than:
$foo = foo_create();
foo_bared($foo);
I'm talking about plain wrappers, wrappers that don't add any functionality
to the one provided by the original php extension they are wrapping.
Xavier