You may consider using an O/R mapping framework like Hibernate or OJB in
combination with flowscript and cforms.

I tried the modular DB actions long time ago, and then switched to
Hibernate. Never thought about switching back.

Your flowscript code will contain these steps:
- populate bean from the database with O/R mapping
- load the cform widgets from the bean (apply the cforms binding)
- send the page to your user and let him edit and submit the form, cforms
will validate the entries.
- save the cform widgets to the bean
- save the bean to the database with O/R mapping

It will be a little bit more than 5 lines of code because you have to open
and close a Hibernate session and do some error checking etc.

Off course this has a serious drawback: yet another framework to learn.

Hugo




> -----Original Message-----
> From: Kim Toms [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 10, 2005 2:57 PM
> To: users@cocoon.apache.org
> Subject: Cocoon + database best practice?
>
>
> I have cocoon and can create pages reflecting queries in the database.
>
> I recently got enough working to be able to change the database.
>
> The question is, what is the best procedure to perform SQL "Update" or
> "Insert" type statements?
>
> Choices appear to be - Modular DB action; database logicsheet; put
> statement in XML and have it transformed by transformer="SQL".  I'd
> just like to know which is viewed as the most modern of these.
>
> If I choose to write a new action, is there a way I can get at the DB
> pool that the other pieces of cocoon uses?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to