On 8/9/06, Michael Babcock <[EMAIL PROTECTED]> wrote:
Would you have your UI button's refresh event refer to the business object's property, or gather that property from the BO into the UI's property set and refer to that instead? For example, which would you choose for cmdShowPayRates.Click: this.enabled = thisform.oBizobj.lSuperUser ...or...
The less the calling object knows about the called object, the looser the coupling and the better the design. Rather than always requiring a property named lSuperUser, you call a method of thisform.oBizobj.IsEnabled(this) and the bizobject can examine the caller, the environment, the phase of the moon, whether the user has enabled that feature and more, and determine what to do. It may also pass on the decision to a security object or something else you haven't invented yet. "Code to interface not to implementation" also implies that it's better to ask the object's method than to query the object's properties. -- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

