Re: [Maypole] Maypole's direction and Perl web frameworks

From: Aaron Trevena (teejay at droogs.org)
Date: Tue Jan 11 2005 - 15:30:08 GMT


On Mon, 10 Jan 2005, Tony Bowden wrote:

> On Mon, Jan 10, 2005 at 10:24:20AM -0500, Vsevolod (Simon) Ilyushchenko wrote:
>> They are auto-creation of instance variables based on column names (so
>> that I don't have to specify them in configs),
>
> There are numerous Class::DBI plugins to do this.
>
>> many_to_many relationships (though maybe has_many can be tweaked to
>> support that)
>
> Class::DBI already supports many to many. It's not the most efficient
> thing in the world, but it's there.
>
> There's also scope for someone to write a proper relationship plugin for
> this. The main reasons I haven't done so yet is that I haven't needed it
> enough, and I can't come up with a nice enough interface.

I have been working on many-to-many relationships as part of PINT, but
there is at least one on CPAN, together with the Is-A relationship. Both
are currently at the proof of concept stage, as is PINT.

PINT itself is a subclass/wrapper for CDBI that provides stuff I like (or
is suggested and seems like a good idea) on top of the simplicity and
extensability of CDBI so that you can use PINT or CDBI or the underlying
SQL::Abstract and Ima::DB features directly.

On of the key things I like about CDBI is that unlike Tangram and other
OOPF it doesn't get in my way when I need to do something relationial or
some feature isn't doing what I need.

I have a couple more Many-to-Many relationships I want to work on, as well
as the complex attributes that PINT implements (arrays, hashes,
vectors,boolean).

I don't think PINT or the new non-core CDBI relationships are mature
enough for use or inclusion with Maypole yet. Hopefully we can get some
dialogue started. I know that what I want from CDBI includes most of what
Tony wants and a lot more so I have built it myself (and thanks to tony
and others who built CDBI to be nice and simple and extensible, its been
rather successful)

>> lack of auto-save for child objects in relationships.
>
> What does this mean?

I would imagine a has_a_child or has_a_parent that would support cascade
deletes, referential integrity and updates the child when the parent is
updated.

Would be simple to implement based on the code available and triggers,
failing that you could just specify that the children autosave anyway.

Cheers,

A.

-- 
Aaron J Trevena - Perl Hacker, Kung Fu Geek, Internet Consultant
AutoDia --- Automatic UML and HTML Specifications from Perl, C++ 
and Any Datasource with a Handler.     http://droogs.org/autodia

_______________________________________________ maypole mailing list maypole at lists.netthink.co.uk http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT