Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Hi Naomi,
We took a more simplistic approach; we attach a dataObj to the biz obj. Upon instantiation of bizobj, the bizObj.dataObj is populated with initial data values. Our base class biz object has a method that compares current bizobj prop values to its attached dataObj prop values, thus detecting changes. Thus, we are not relying on either the presentation or the data layer to detect changes, which IMO, should be strictly a function of the biz layer.
However, we are still in the development phase, though this seems to be working well so far.
I too would like to hear more about other's approach/comments to this issue.
Sorin
>That's an interesting problem and I'd like to hear other opinions here as well. It may be a better idea, especially in WEB based application, where changes are done through web forms and Java scripts handle problems without requiring a trip to the server.
>
>Of course, your idea requires special form and user control classes, but I'm sure you have them developed already in your framework.
>
>In The MereMortals framework for VFP the data changes are detected on the database level, that creates an extra complexity.
>
>>The Save button is initially disabled. If changes are made, the Save button is enabled. This test definately belongs in the UI because it enables a button.
>>
>>The flag is actually on a facade object to the business object and is checked if the user tries to navigate off the changed record or close the form without saving. If that happens, a dialog is thrown up informing the user that changes were made and asking them to save, continue and not save, or not continue.
>>
>>I don't ever have to worry about detecting changes using GETFLDSTATE() or GETNEXTMODIFIED(). The flag handles that.
>>
>>>Why are you tieing data changes detection to the interface? AFAIK they should not know about each other. Though of course this approach can be used.
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