db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lederrey Guillaume <Ge...@LedCom.ch>
Subject Re: AW: Torque & Swing
Date Sat, 19 Jun 2004 10:38:07 GMT
Hash: SHA1

  Thanks again for your concern !

> 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;

  Not exactly. I dont want the changes propagated to the database, but 
propagated to to Torque objects.  I think most of the constraint checking and 
general logic should go in a subclass of the Torque classes. Then, the GUI 
construction is pretty strait forward :

- - copy values from Torque Object
- - let the user edit them (copy from the components -> Torque object)
- - check the values and correct them (copy from Torque -> components)
- - save to the database

  That's quite a lot of code (I'm very lazzy) just to handle the copy to/from 
the torque objects, handle the references correctly, ...  That seems all like 
very common operations in a data oriented application, so i was hoping to 
find a ready to use solution ...

  Taken from an MVC view, my GUI form is the View, the Base Toqure Object 
implements the model and a subclass of that object implements the Controller. 
So the Model and Controller are "merged" but that's quite usual in Swing.

  I dont really understand why I would not want that ...  But I'm ready to 
change my mind if it seems logical ...

  OK, I'm going to code some, and try to apply the ideas you've just given 
me ...

	Guillaume Lederrey
Version: GnuPG v1.2.4 (GNU/Linux)


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

View raw message