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

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

From: Tony Bowden
Subject: Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"
Date: 22:23 on 25 Jul 2005
On Mon, Jul 25, 2005 at 11:11:18PM +0100, Tony Bowden wrote:
> I've gradually been refactoring Class::DBI to make it much easier to do
> this with almost everything.

For people who like me to be more transparent, and explicitly so, rather
than everyone having to piece it all together from various posts here
and there, I'll reinterject here that one of the big holdups with
Class::DBI recently has been the long planned Class::DBI::Attribute that
will allow me to properly move large chunks of the core, and hopefully
solve of all the inflation/deflation problems.

Despite my best endeavours, and those of several people who have
volunteered to help with this, I've just never been able to get it work,
or even to work out why it doesn't work.

Based on previous experiences, I expect that I'll need 2 or 3 days
uninterrupted hacking to break this, and that's pretty elusive at this
stage...

For those who are new, or who don't remember the details, the plan is
that instead of storing the current value for each column directly in the
object, we instead store it as an Attribute object (suitably overloaded
such that existing code all continues to work).

The object will know the 'raw' database version, as well as what it
represents (if it inflates), and the rest of the CDBI code can therefore
ask it for whichever version it needs at any time (thus removing
all inflate/deflate woes). Similarly it can keep track of whether the
application has changed that value but not rewritten it to the database
(thus making all the is_changed code etc much cleaner). A lot of the data
validation can also move here (each Attribute will know which Column
it is attached to, so can look up the constraints etc attached to that
Column and make sure that any new value is valid).  There are also lots
of other benefits that I've forgotten, but will no doubt remember if I
can ever even get the first part to work.

But every time I've tried in the past, no matter how small I make the
steps, I get tripped up somewhere...

Tony

(message missing)

Re: Annouce: DBIx::Class, a.k.a "taking the easy way out"
Tony Bowden 22:23 on 25 Jul 2005

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

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