OOP Recordset puzzle
1 messages in this thread
Brian,
Why is this approach less object-oriented? If you needed stock for all these
machines (assuming for the moment they are CNC multiple-spindle machine tools,
as an example), you wouldn't run to the steelyard once for each machine;
instead, you'd stock a local inventory and have each operator fetch stock for
the machine from the local inventory.
Object-oriented design is a matter of knowing what the objects are and mapping
them to your implementation for efficiency in just the same way as the stock
fetching problem. If the machine operator solves the problem, he might go get
the stock from the steelyard himself; he's not concerned about efficiency (he
may even enjoy the ride). The plant supervisor (or cell foreman, or whomever
is in charge) makes the decision to do things more efficiency by organizing a
larger entity, the cell or shop-floor, to share the cost of the trip to the
steelyard.
So why not an entity called CCell or CShopFloor that runs the query, then
initializes anll the CMachines? The CMachines wouldn't be recordsets then, just
local objects.
If this isn't a good way to do it, this isn't a Moosehead Ice I'm drinking…
(or maybe this isn't a good way to do it, and this _is_ a Moosehead Ice I'm
drinking…)
%-)
-Dale
South Wind Design, Inc.