> My question: What is the best strategy? Include in the object or keep
> outside as a file?

My policy (which I don't always manage to follow 100%):

1. If the code is shared between multiple forms or between a form and other
pieces of code, the EEP goes in an outside file.  The principle is to always
avoid duplication of logic.

2. If the EEP does work not related to the user interface of the form (that is,
something other than issuing PROPERTY commands), or if the EEP is called by
multiple objects on a form, then it goes in a custom form action and is called
by individual EEPs on each object.  Again, I avoid duplication of logic, as
well as separating the UI logic from the actual program logic.

3. If the EEP is unique to an object and performs only UI work, it goes in the
appropriate EEP slot of each object.

To the greatest extent possible, I try to have the code live in the form -- as
long as I don't have to violate the rule of no duplication of logic.
--
Larry

Reply via email to