Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CDE - Rule
Message
De
16/04/2003 03:29:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Titre:
Divers
Thread ID:
00778147
Message ID:
00778205
Vues:
21
This message has been marked as a message which has helped to the initial question of the thread.
Mr Ivan:

The issue as to whether you should store a rule class in its own library and drop an instance in a CDE is really about a single factor ... are you likely to re-use that rule anywhere else? If the answer is "yes", then store it in its own library. If not, don't. Remember that if you create a rule in a CDE and then decide you want to make it into a "superclass", you can always save it as a class in its own library and then simply drop an instance of it back to the originating CDE. I have done this a few times where I started out a rule class in the CDE and thought, hmmm, I could use that again. In these circumstances I have simply extracted it from the CDE into its own library.

As to the new method, ask yourself to what part of your application is it specific? If it is a method to enhance rule classes generally, you could create an IvanRuleClass, add the method there and base all other rules on your IvanRuleClass, thereby adding the new method to each and every rule instance. If the method is domain specific and part of your application's business logic and perhaps, more importantly, specific to the cursors in a single CDE, then it is likely better added to the CDE in question or added to a utility class library that can be called from wherever it is required whether that be in a method or event of a rule class or CDE.

HTH
-=Gary
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform