main logo
Subject: Re: Class design question
Author: Ed Leafe
Posted: 2003/07/31 19:48:00
 
View Entire Thread
New Search


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 Ed Leafe
<-- Prior Message New Search Next Message -->