Information générale
Catégorie:
Programmation Orientée Object
>So I bind the Controlsources of the controls on the form in the form's init event after the THISFORM.oItem.OpenAllTables().
>
>Is this the right approach to this situation, or are there better ways of doing the 2 tier design?
>
>I know that this is a long story, but this question has bothered me for some time now, so I would really appreciate some more information on this desing issue.
I do something similar. My only real question is: What are you "binding" to ?
My "DataSet classes" are private "Session" classes that have properties (ie. an interface) that the Form (via .ControlSources) is bound to. These "properties" would correspond to "fields" in the underlying "dataset". The Form communicates with the underlying "dataset" (table, query, array, "remote object", whatever) thru this interface, and the various "data access methods" (Move_First, Move_Last, Write_Record, etc.)
Not necessarily better; just the way I do it.
One advantage is I can "run/test" a Form without having a physical table/whatever in place (yet) ... or, in other words, I can "bind" without actually having something to bind to. It's relatively easy to change data sources too.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement