Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"

[prev] [thread] [next] [Date index for 2005/07/27]

From: Christopher Hicks
Subject: Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"
Date: 18:04 on 27 Jul 2005
On Wed, 27 Jul 2005, Matt S Trout wrote:
> On Tue, Jul 26, 2005 at 11:34:18PM -0400, John Siracusa wrote:
>> As someone else already pointed out, implementing even the "default" 
>> functionality via delegation is a great way to ensure that the 
>> delegation interface is useful and has the appropriate granularity. 
>> You become the first "user" of the API.
>
> I know delegation is a good thing for well-defined plugins.
>
> I know MI is unnecessarily hairy if you only want to extend something simple.
>
> But in the early stages of dev, I always refactor constantly and heavily, and
> often throw away whole chunks of code and API because it's much better to do
> that *now* than after a release.
>
> So I'm not implementing a delegation interface quite yet.
>
> If anybody thinks there should be one already, provide me a patch and I'll
> happily merge it. But you'll be responsible for maintaining it when I
> rewrite half the core in a day or a week.
>
> The End. :)

Bravo.

I've been sitting mostly on the sidelines watching this whole thing 
evolve and its been interesting and educational.  A few thoughts come to 
mind:

- The cavalry of object oriented correctness came on a bit strong.  There 
are perfectly rational lessons against MI in the literature and in the 
oral tradition of OOP developers.  As Matt exhibits above he's not trying 
to start some renaissance of unsafe MI.

- It really wasn't clear in the beginning whether Matt was trying to start 
such a renassiance or not.  If it was stated a lot of people (including 
me) missed it.

- MI has more going for it than I would have ever considered if I'd paid 
attention to the OOPly correct authors who labeled MI as heretical. 
There's an appeal for early development in being able to easily move code 
around.  Once the code is grouped in a logical fashion logical 
opportunities for defining API's will hopefully become apparent.

- GOTO's are awful too, but if you're translating nontrivial Fortran that 
uses GOTO's into C or Perl, there are some days where just doing a line 
for line translation is adequate.  Its life.  Perl is pretty good about 
making room for life.  :)

- Its nice having another competitor in the space of DBI/Object 
abstractions.  CDBI is pretty clearly the leading tool in this space, but 
there's room for people to try other ideas and see how they work out.  I 
don't think there's anything wrong with Class::DBI being in a stable, no 
cataclysmic changes state, but its also nice to have something that folks 
can play with the API without worrying about backward compatibility.

        -- 
        </chris>

"There are four boxes to be used in defense of liberty:
  soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)

(message missing)

Delegation vs Hooks (was: Annouce: DBIx::Class, a.k.a "taking the easy way out")
=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?= 23:27 on 26 Jul 2005

Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"
Christopher Hicks 18:04 on 27 Jul 2005

Generated at 16:37 on 28 Jul 2005 by mariachi v0.52