Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which is the right place for the code?
Message
De
17/11/2003 17:04:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Which is the right place for the code?
Divers
Thread ID:
00850779
Message ID:
00850779
Vues:
50
I have the following doubt: which is the right place for the code?
For example, if I have a form with three Command Buttons on it:
btnAccept, btnCancel and btnDo, must the Click() event of each button have the code, or each one must do calls to forms methods, i.e.: ThisForm.Accept(), or ThisForm.Cancel(), etc.?
I think the later is the right one, considering that the buttons are the User tier, and the form is the Business one, and everyone who wants to call those methods (a toolbar, for example), calls oRefToMyform.Do().
But a teammate of mine says that all the code must reside in the class that do the job, and for him the button is who really does it, and a client who wants to use the services of this class, must call oRefToMyform.btnDo.Click().

Sorry if it was too long, I will appreciate any suggestion
Ricardo Aidelman
Software Developer
Praxis Computación
Buenos Aires, Argentina
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform