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