cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: [RT] Direct Form->SQL mapping through OJB and DynaBeans
Date Sun, 02 Nov 2003 12:52:37 GMT

On Friday, October 31, 2003, at 03:25 PM, Sylvain Wallez wrote:

> Hi,
> Some people to which I demonstrated Woody and Flowscript asked me how 
> we can directly map forms to a database.
> Yeah, I know that architecturally having intermediate domain objects 
> is better, but it seems a bit overkill when what you need is just a 
> simple CRUD front-end to a database and have no additional logic.

I am about to write some of these ....

> Writing a SQL binding for forms seems a complicated beast to me (maybe 
> I'm wrong as I'm not very fluent in SQL), so I was thinking of using 
> tools that would to the dirty work for me.

I am using Hibernate

> And here comes (Antonio, you'll be happy!!) OJB, which AFAIK can 
> persist DynaBeans [1].

I still have not groked DynaBeans ... :(

> So what about adding a getBean() to the widget interface that would 
> return a DynaBean wrapper of the form widgets? A simple OJB mapping 
> file and voilĂ , persistant forms!
> What do you think?

Very cool .....

The approach I was going to explore ... was to start with a Hibernate 
Mapping file, then generate as much as possible from that ....

User.hbm.xml --> User Table using 
User.hbm.xml --> using 
User.hbm.xml --> UserFormModel.xml, using xslt
User.hbm.xml --> UserFormBinding.xml, using xslt

I have only attempted the first step so far, so do not know yet how 
realistic the rest of this is :)

regards Jeremy

View raw message