Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which is the right place for the code?
Message
From
17/11/2003 17:04:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Which is the right place for the code?
Miscellaneous
Thread ID:
00850779
Message ID:
00850779
Views:
49
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
Next
Reply
Map
View

Click here to load this message in the networking platform