Re: Re: aggergate vs MI
| From: | Stig S. Bakken | Date: | Mon, 08 Apr 2002 11:31:06 +0000 |
| Subject: | Re: Re: aggergate vs MI | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82251@lists.php.net to get a copy of this message | ||
On Mon, 2002-04-08 at 02:50, brad lafountain wrote:
>
> --- "Stig S. Bakken" <ssb@fast.no> wrote:
> > On Sun, 2002-04-07 at 20:35, brad lafountain wrote:
> > >
> > > What would be wrong with having the *_SQL_* objects be a member of the
> > > *_Connection* classes?
> >
> > What you're describing here is object aggregation.
>
> What do you mean... Im saying that the SQL implementation is a member or the
> connection class.. Nothing to do with aggergation. aggergation would mean the
> methods of the sql imp would be apart of the connection class not a member.
>
> Im still not convinced that aggergation is usefull.
Object aggregation in general is a technique where you have some
functionality in objects you forward calls to, a pretty common
technique. You can of course do that in PHP today, but it's slow (lots
of userland method calls) and high on maintenance (if an aggregated
class gets a new method, you must make a new wrapper in the forwarding
class, etc). In my opinion, providing "native" support for this in an
efficient way makes a lot of sense for PHP.
- Stig