Thanks Ed,
I figured a Get method was probably the way to go. Didn't think of a rules factory.
Jim
-----Original Message----- From: profox-bounces /at/ leafe D.O.T com [mailto:profox-bounces@leafe.com] On Behalf Of Ed Leafe Sent: Thursday, July 31, 2003 4:19 PM To: ProFox Email List Subject: Re: Class design question
On Thursday, July 31, 2003, at 02:12 PM, Jim McKinniss wrote:
> The DataMgr has a property called nWorkArea that is needed by the Nav > and Rules objects. It is set when the DataMgr opens the cursor. Since > each of the other two objects need access to this property, should I > move it to the aBizObj?
I would typically create a Get method on the aBizobj that other objects could query when needed; this method would get its return value from the DataMgr object. Depending on the likelihood of the work area changing in the life of the object, the other classes could store that value locally to avoid continuous calls to the bizobj.
> Also, I was thinking that it might be nice to be able to change out the > rules object at run time. For example, you might have a set of > inventory > pricing rules based on a given customer's classification. Then whenever > the user selects a new customer, just change oBizObj.oRules property.
Sure - that's done all the time. Just have a Rules Factory class that accepts the customer classification, and returns the appropriate object to handle it.
___/ / __/ / ____/ Ed Leafe http://leafe.com/ http://opentech.leafe.com
©2003 Jim McKinniss |