Re: OO Architecture
[email protected] (Tim Bunce) Fri, 23 Sep 2005 23:16:05 +0100
| Newsgroups | perl.dbi2.dev |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Sep 23, 2005 at 11:01:44PM +0200, Jochen Wiedmann wrote: > Tim Bunce wrote: > > >Ah, you can't get away that easily! *Why* do you strongly believe it is? > > Arrgh! He got me. :-) > > There is a simple argument: In the last years, there were many examples > of users who wanted this and that feature to be in the DBI. A typical > response was: Create your own DBI subclass and publish it on CPAN. If > your ideas are good, the subclass will be used and the ideas will at > some time be merged into the DBI. > > To me, this is an excellent example of the tmtowtdi principle. It is > matching Perl's philosophy. So what CPAN modules you you, or anyone else, point to as good examples of subclassing the DBI? > >What examples of DBI subclassing can you show to prove your case? > > DBI::ProxyServer :-) (Bad example, to be honest, because it could have > been written in a different manner.) :) > >How do Java developers get around the lack of subclassability in JDBC? > > Typically they write proxy drivers, which sit on top of the actual > driver. Besides, there is always AOP. AFAIK, there is nothing like AOP > in Perl 5. Perhaps Perl 6 is different? Yeap: Perl6 has Roles. (Though I don't claim to understand AOP.) http://dev.perl.org/perl6/doc/design/syn/S12.html#Roles Tim.