Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Procedure or Method
Message
From
14/07/2000 10:02:19
 
 
To
14/07/2000 05:10:23
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00392279
Message ID:
00392362
Views:
9
>I have a form that will call many programs to carry out various procedures.
>
>Should I have a central "functions" program and call them from the form, or should I be putting all the procedures into methods on the form.
>

To decide how to do this, you must consider a few things-

Is the functionality you are trying to place completely generic and independent of an business process? IOW, could these functions be seen as an extension of VFP? If so, they should be functions in a procedure file.

Is the functionality you are trying to place specific to a business process? If so, it should be placed in a business object class that was built to house function pertaining to that entity/process. (Hint- even if you think that the functionality will never be used outside the form, think again- this sort of requirement changes often... before you know it, you will need the same logic driving a web page or running in a batch)

Is the functionality specific to the UI needs of an entire class of forms? If
so, then it belongs in a form method at the class level.

Is the functionality specific to the UI needs of a single form? If so, it belongs in a custom method of your scx form, or the instance level form class.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform