Ed Leafe wrote:
On Jul 31, 2006, at 1:38 PM, Michael Babcock wrote:

Would you rather your UI look at a property on the bizobj interface for a value, or call a bizobj function to get the value? Assume that it's something that would only be called once or twice, not repeatedly (as the case would be with something in a UI.refresh event).
Is there a better choice, or is this "6 of one, 1/2 dozen of another?"

The important thing is that when you create your design, you define an interface that will not be changing and use that for all inter-object communication. Whether it is a property or a method call is not that important; what is important is that you don't have objects accessing implementation details.

And by that you mean to be very interchangable and not get snagged on the different layers from which it may be called, if I understand that principle correctly. An example for folks not familiar with this would be where you program something using objects on a page, then later put them into some other container on a different level (say a page within a pageframe). If you've designed to the interface, everything should still function just fine instead of not being able to find the references correctly. That's another reason why it's good to put the code in the highest level (in this case, the custom form methods) instead of the button.clicks. Also allows for easier re-use if you really need it: like instantiating the form and calling it's custom object -- that's a heck of a lot easier than instantiating the form and having to drive down 'n' levels into the object hierarchy to some button's click event!

Just trying to help the lurkers...correct me if wrong.

--

Thanks,
--Michael



_______________________________________________
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.

Reply via email to