Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stateless Objects.
Message
De
21/09/2000 09:12:50
 
 
À
21/09/2000 09:06:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00416469
Message ID:
00418958
Vues:
29
>
>This won't work. It isn't stateless. A better way is to have the UI send the data to a Save() method. Save() calls Validate(). Validate() returns a text string that contains the messages to be displayed for all data that fails validation. If empty, all data is valid and Save() calls the appropriate Data objects to save the data and then returns. If data fails validation, the text string is returned from Save() to the UI for display.
>
>Remember that one of the rules of this thing is that you need to be stateless. You can't set properties and then retrieve them from another method call. Everything has to be handled in parameters and RETURN values.

One more thing. You could return an ADO recordset that had one row for each validation failure, but you would RETURN that from the Save() method. You don't want to call another method to get it.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform