cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: [C2] allowing multiple additions with DatabaseAddAction
Date Tue, 15 May 2001 13:03:50 GMT
> Allan Erskine wrote:
> I'm using a modified DatabaseAddAction that allows multiple additions for multi-valued
parameters.  I've found it useful esp for
> adding multiple entries for lists of checkboxes and multi-line selects.

This sounds cool.

> Unfortunately it involves using a modified AbstractDatabaseAction too (not too modified,
still back compatible), and the way I've
> gone about it seems really cludgy.  I have the feeling that the current DatabaseAction
code wasn't really written with multiple
> additions in mind.

It wasn't.  That wasn't a need at the time I wrote it.  What I needed was a way to snag
one page of information and put it in a database.  There is probably a certain level of
complexity that doesn't really need to be there.  In other words if I used setString()
for every parameter, it would be ok--but I was using natural types to do a rudimentory
test for data correctness.

How do you propose to do it differently to make it really work the way you want?

> Does anyone else think that being able to add multiple records at a time is useful? 
And if so, is there a better way of going
> about it than cludgy hacks to the DatabaseActions?

Sometimes there is a time for revolution instead of evolution.  When the current design
can't support future needs, sometimes you need to refactor instead of kludge things together.
That is why Cocoon 2 is so different than Cocoon 1.  There is no way that the sitemap would
be able to be implemented in a sane manner in Cocoon 1--and many Cocooners like it that way.
Both have the elegance of design that they need--but with different purpose.

To unsubscribe, e-mail:
For additional commands, email:

View raw message