db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From T E Schmitz <mail...@numerixtechnology.de>
Subject Re: AW: Torque & Swing
Date Fri, 18 Jun 2004 10:50:03 GMT

Hello Guillaume and Gerhard,

Gerhard Otte wrote:
> From your question i think yor are looking for something like those
> data bound controls in the Windows/Visual Basic/etc. world, where
> every keystroke is reflected from the control to a table column in the
> database.
> One thing i learned from using torque is you definitly don't want this;

I have just re-read Guillaume's last posting. I presume Guillaume does 
not want each edit to go straight through to the database when he says 
"I would like that each time a field is edited, the change is reflected 
to the Torque object (and vice-versa)". I presume he wants a GUI field 
edit to cause a Torque object update only. <???>

By the sounds of it, I have taken a similar approach like you, Gerhard: 
Between the Torque layer and the application(=gui) layer I have a 
business layer. So the front-end doesn't know nor care about Torque. My 
businessObject interfaces are implemented in the db layer. These 
businessObject implementations sit on top of the Torque *Base and *Peer 
classes. The businessObjects contain more or less only setter/getter 
methods and corresponding *Manager classes provide manually edited 
find/update/create/delete methods. Again, I have generated the 
businessObject interfaces and some abstract classes from the schema and 
added some further logic manually.

However, for the GUI that means: when the user presses the "Save" 
button, the businessObjects have to be populated with a dozen 
bizObject.setXYZ(guiField.getText()) ..., followed by 
bizObjectManager.save(bizObject).

I have a feeling that Guillaume is seeking to do this kind of 
automagically, a framework that binds the guiFields to the bizObject 
properties. <????>

Now I am a bit out of my depth. But I think that is data binding (and 
ideally you want data validation, too) by which the form objects would 
be connected to the business objects. That is what I meant in the last 
paragraph of my in my previous posting although I have not yet thought 
about how that could be realized.

> Regards
> Gerhard Otte

(PS: It's a small world, your name sounded familiar, Gerhard - you only 
helped me last week in de.comp.lang.java with the JFormattedTextField 
selection ;-) )

-- 


Regards,
Gruß,

Tarlika Elisabeth Schmitz

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message