cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject Re: [RT] Direct Form->SQL mapping through OJB and DynaBeans
Date Fri, 31 Oct 2003 15:46:41 GMT

Sylvain Wallez wrote:

> Hi,
> Some people to which I demonstrated Woody and Flowscript asked me how we 
> can directly map forms to a database.

no surprise here :-)

> 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.
> 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 have been thinking about the direct sql mapping on and off, the 
biggest problem I was able to identify (not solve) is that sql is not 
'symmetric' in its load and save operations (while woody binding is)

with symmetric I mean for doing updates or inserts you can't just give a 
resultset back to the JDBC connection...

> And here comes (Antonio, you'll be happy!!) OJB, which AFAIK can persist 
> DynaBeans [1].
> 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!

This would set asside the usage of the alltogether then?

I'm not into OJB enough to understand just how simple this simple 
mapping file would be, some example/hint might help understanding the 

> What do you think?

I think it would make for a killer usage pattern for the easy-apps!

And it makes sense: the form-definition model is in fact to be seen as a 
'class' definition of form-instances, no?
(maybe in stead of dynabeans you could abuse the opportunity to boost 
your bcel skills again ;-))

> Sylvain
> [1] 


Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                        

View raw message